Skip to content

Commit d15933e

Browse files
committed
changes to README.md reflect current state of discussion/development, IOW, we updated our spec
1 parent 6c7a246 commit d15933e

File tree

1 file changed

+74
-35
lines changed

1 file changed

+74
-35
lines changed

NewPackages-HOWTO/README.md

Lines changed: 74 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -46,74 +46,113 @@ The catch:
4646
* 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.
4747
* 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.
4848

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):
5050

5151
Before running "make all":
5252

53-
+-Makefile
54-
|
55-
+-md5sums.txt
53+
+-(build) # will be created by first call of "build", and wiped by "clean" or "distclean"
5654
|
57-
+-(CLIENT_DATA)
55+
+-(buildscripts)
5856
| |
59-
| +-delsub*.ins
57+
| +-script files that might be needed to apply patches during the build process
58+
|
59+
+-(CLIENT_DATA.in)
6060
| |
61-
| +-setup*.ins
61+
| +-delsub*.opsiscript.in
6262
| |
63-
| +-unins*.ins
64-
|
65-
+-(OPSI)
63+
| +-setup*.opsiscript.in
6664
| |
67-
| +-control
65+
| +-unins*.opsiscript.in
6866
|
6967
+-(files) # optional
7068
|
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
7276

7377
Note that there is no longer a directory "unpacked". See below for why.
7478

7579

7680
After running "make all":
7781

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-
|
9682
+-(build)
9783
| |
9884
| +-(CLIENT_DATA)
9985
| | |
10086
| | +-(files) # See Note
10187
| | |
102-
| | +-delsub*.ins
88+
| | +-delsub*.opsiscript
10389
| | |
104-
| | +-setup*.ins
90+
| | +-setup*.opsiscript
10591
| | |
106-
| | +-unins*.ins
92+
| | +-unins*.opsiscript
10793
| |
10894
| +-(OPSI)
10995
| |
11096
| +-control
11197
|
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.
113121

114122
Note:
115123
* This directory will now be used as a target for unpacking, if required. No more files/unpacked.
116124
* 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.)
117125

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
152+
153+
* clean
154+
* get-orig-source
155+
* build
156+
* install
119157

158+
when called with "make all"

0 commit comments

Comments
 (0)