You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: NewPackages-HOWTO/README.md
+74-35Lines changed: 74 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,74 +46,113 @@ The catch:
46
46
* The regular approach of simply writing the results to the ./build directory was never designed for large binary blobs. Blindly copying everything over means tripling (source, destination, inside package) the required space instead of doubling (source, inside package) it.
47
47
* Hardlinks come in handy for this, but special care must be taken that files that need to be edited in some way are not hardlinked, else they will be changed in the source directory as well - this would be especially bad for packages that rely on md5sums.txt to work.
48
48
49
-
Our proposed package subdirectory structure looks like this:
49
+
Our proposed package subdirectory structure looks like this (incorporating changes that OPSI-Scripts should now end in .opsiscript, rather than .ins):
50
50
51
51
Before running "make all":
52
52
53
-
+-Makefile
54
-
|
55
-
+-md5sums.txt
53
+
+-(build) # will be created by first call of "build", and wiped by "clean" or "distclean"
56
54
|
57
-
+-(CLIENT_DATA)
55
+
+-(buildscripts)
58
56
| |
59
-
| +-delsub*.ins
57
+
| +-script files that might be needed to apply patches during the build process
58
+
|
59
+
+-(CLIENT_DATA.in)
60
60
| |
61
-
| +-setup*.ins
61
+
| +-delsub*.opsiscript.in
62
62
| |
63
-
| +-unins*.ins
64
-
|
65
-
+-(OPSI)
63
+
| +-setup*.opsiscript.in
66
64
| |
67
-
| +-control
65
+
| +-unins*.opsiscript.in
68
66
|
69
67
+-(files) # optional
70
68
|
71
-
+-(build) # will be created by first call of "build", and wiped by "clean" or "distclean"
69
+
+-Makefile
70
+
|
71
+
+-md5sums.txt
72
+
|
73
+
+-(OPSI.in)
74
+
|
75
+
+-control.in
72
76
73
77
Note that there is no longer a directory "unpacked". See below for why.
74
78
75
79
76
80
After running "make all":
77
81
78
-
+-Makefile
79
-
|
80
-
+-md5sums.txt
81
-
|
82
-
+-(CLIENT_DATA)
83
-
| |
84
-
| +-delsub*.ins
85
-
| |
86
-
| +-setup*.ins
87
-
| |
88
-
| +-unins*.ins
89
-
|
90
-
+-(OPSI)
91
-
| |
92
-
| +-control
93
-
|
94
-
+-(files) # optional
95
-
|
96
82
+-(build)
97
83
| |
98
84
| +-(CLIENT_DATA)
99
85
| | |
100
86
| | +-(files) # See Note
101
87
| | |
102
-
| | +-delsub*.ins
88
+
| | +-delsub*.opsiscript
103
89
| | |
104
-
| | +-setup*.ins
90
+
| | +-setup*.opsiscript
105
91
| | |
106
-
| | +-unins*.ins
92
+
| | +-unins*.opsiscript
107
93
| |
108
94
| +-(OPSI)
109
95
| |
110
96
| +-control
111
97
|
112
-
+-newpackage.opsi
98
+
+-(buildscripts)
99
+
| |
100
+
| +-script files that might be needed to apply patches during the build process
101
+
|
102
+
+-(CLIENT_DATA.in)
103
+
| |
104
+
| +-delsub*.opsiscript.in
105
+
| |
106
+
| +-setup*.opsiscript.in
107
+
| |
108
+
| +-unins*.opsiscript.in
109
+
|
110
+
+-(files) # optional
111
+
|
112
+
+-Makefile
113
+
|
114
+
+-md5sums.txt
115
+
|
116
+
+-(OPSI.in)
117
+
|
118
+
+-control.in
119
+
120
+
The resulting newpackage.opsi (and the newpackage.opsi.uploaded marker) will end up in the directory *above* the one where the Makefile is located. This is different from most other OPSI-related package build scripts, but follows standard Make conventions.
113
121
114
122
Note:
115
123
* This directory will now be used as a target for unpacking, if required. No more files/unpacked.
116
124
* In theory, it would be possible to do away with this folder, and save/unpack the files from ./files to ./build/CLIENT_DATA. However, keeping OPSI scripts and installer files separate seems like a good idea (avoids naming conflicts, OPSI script files are easier to spot, etc.)
117
125
118
-
While there will most likely be packages that do not honor this HOWTO, new packages should be built according to it, and older ones changed at the next convenient moment.
126
+
All *.in-files are templates. If a particular *.opsiscript file does not need to be patched, drop the .in from the file name and it will be copied over untouched during the build.
127
+
Inside a template file, please use @@@UNIQUEPLACEHOLDER@@@ for parts that need to be patched.
128
+
129
+
Makefiles should implement the following commands:
130
+
131
+
* clean (wipes "build", also wipes "files" for open-source packages)
132
+
* distclean (AKA purge, wipes "build" and "files", even for closed-source packages)
133
+
* get-orig-source (downloads open-source packages and checks their signature/hash, if available; checks MD5 of ./files/* in case of closed-source packages)
134
+
* build (starts the actual build process and creates the *.opsi file)
135
+
* install (tells the OPSI server to install the particular *.opsi file and asks for default parameters, if required)
136
+
137
+
Internally, the following sub-command names should be used:
138
+
* download (for open-source packages, as part of get-orig-source)
139
+
* unpack (optional, if downloaded packages need to be unzipped, untarred, ...)
140
+
* checkhashsig (optional, to check hashsums/signatures, if available)
141
+
142
+
While there will most likely be packages - and even Makefile templates - that do not honor this HOWTO, new packages should be built according to it, and older ones changed at the next convenient moment. Updating the Makefile templates is a work in progress.
143
+
144
+
# Plans for the future
145
+
146
+
Unlike some other Projects providing Makefile-based OPSI package templates on Github, our Project uses one repository per package.
147
+
This follows "best git practice", but might make it inconvenient to install packages that depend on other packages.
148
+
For that, meta-repositories should be created, using "git submodule add", which pull in all the required repositories to build the package(s) in question.
149
+
One such meta-repository could be named "all-DotOP-open-source-packages".
150
+
151
+
A "supermake" Makefile then starts going through all subdirectories, calling in turn
0 commit comments