102 Commits

Author SHA1 Message Date
Tom G. Christensen
6776f58c74 Move shortroot handling to the install stage. Automatically adding
$prefix inside the stagedir when necessary.
2009-12-19 14:38:41 +01:00
Tom G. Christensen
80bb0c3785 Handle IRIX64 when computing _os
Kill shortroot handling. This is now handled at install time.

Cleanup the topinstalldir/metainstalldir etc. confusion

topinstalldir now explicitly marks where the package is attached to the
filesystem. Like /usr/local or /.
metainstalldir is used to define the location of the metadata files like
relnotes and distfiles.
2009-12-19 14:38:41 +01:00
Tom G. Christensen
4d0fb00229 Doh! 2009-12-19 14:38:41 +01:00
Tom G. Christensen
f44a2f526a Fix a stupid typo and convert mkdir to ${MKDIR} 2009-12-19 14:38:41 +01:00
Tom G. Christensen
abe8d6774e _docdir is an external variable used in build.sh and pkgdef so changing
it halfway through is very bad. Fixed.
This frequently caused ./build.sh install pack to break because _docdir
is redefined between the 2 steps.
2009-12-19 14:38:41 +01:00
Tom G. Christensen
4d0d979899 Turn of stripping of static archives
Reimplement the auto keyword for depends.
It's now used slightly differently, where before it would create an
explicit depend on sw.base it can create a depend on any internal subsystem
In depends you can now put:
sw.base sw.lib auto

And you sw.base will automatically depend on the explicit version of sw.lib
2009-12-19 14:38:41 +01:00
Tom G. Christensen
d070a548a4 Moved all the reg code out of the build.sh script an into a function
library instead.
2009-12-19 14:38:41 +01:00
Tom G. Christensen
d204021507 Really update manpage fix/compress logic to match Solaris 2009-12-19 14:38:41 +01:00
Tom G. Christensen
d34f50fde5 Add the pkgvendor field for vendor information 2009-12-19 14:38:41 +01:00
Tom G. Christensen
e31a0ba00c Clean up the relnotes template and make it a little "lighter". It reads
easier now with fewer headlines.
Fix spelling of dependencies.
2009-12-19 14:38:41 +01:00
Tom G. Christensen
88847c7058 Add RMDIR
Add new error message that will be trigged by an overflow of the version
number in fix_ver (buildpkg.packaging.irix)
Add a small Irix specific hack to clean (see the commit comment for
buildpkg.packaging.irix, r1.32 for the full explanation)
2009-12-19 14:38:41 +01:00
Tom G. Christensen
9bc75b0e9e Add vendor and packager details to the releasenotes. This was something
I think was sorely missing before and something that's standard on Solaris.

Make it possible to automatically have modified configure_args put into
relnotes. It's a bit of a hack where instead of assigning the value
directly to the variable we go through a function. Now the nasty bit
is that we can't add relnotes.txt to META_CLEAN since generic_pack
does clean meta which would wipe out changes from build stage.
Instead we add a hack to the distclean method in clean that removes this
file.
I may eventually have to create a generic_clean method that can
be called from pr. platform specific clean function to avoid this kind
of layer violation.

Fix the format of the spec version field again.
I just realised a fairly obvious flaw with the existing system where
increasing the pkgrev from single digits to multiple digits didn't increase
the version but actually decreased it.
Ie. 1.19-9 becomes 11990000 and 1.19-10 becomes 11910000 - ooops!
Instead the pkgrev should be right justified, so instead of 11910000 we'd
have 11900010.
I also eliminated the need for printf in fix_ver, something I shou've
done from the beginning when I realised that Irix 5.3 printf was not up to
the task (only supports %s).
2009-12-19 14:38:41 +01:00
Tom G. Christensen
ff2b7756d5 Make newpkg work on 64bit Irix machines too :) 2009-12-19 14:38:41 +01:00
Tom G. Christensen
1a59293fc4 Changes to accomodate infopage compression
Do't include pristine source in the tardist to save space. Instead
only local patches will be in the opt.src subsystem (now truly optional)
Add a - infront of the shortdesc, it looks nicer in swmgr
2009-12-19 14:38:41 +01:00
Tom G. Christensen
c050cce4ec compress infopages
Fix manpage formatting to use a simpler commandline
2009-12-19 14:38:41 +01:00
Tom G. Christensen
e7bd263f8c Update manpage fix/compress logic to match Solaris 2009-12-19 14:38:41 +01:00
Tom G. Christensen
2bde37eb9c topinstalldir is a global so adding / to it on every invocation of
add_files was not very bright :(
Permission in distfiles should be 0644 as everywhere else.
2009-12-19 14:38:41 +01:00
Tom G. Christensen
36e25bc278 Do the right thing if someone deleted pkginfo.$secname instead
of rm -rf'ing the package dir.
2009-12-19 14:38:41 +01:00
Tom G. Christensen
f0079c1084 Custom PSTAMP format
Add support for a space file
Don't compress manpages on Solaris since it won't know what to do with them
2009-12-19 14:38:41 +01:00
Tom G. Christensen
d4accdc00b Move package revision into the version field using the standard ,REV=
notation.
Seperate formatting of manpages and compression of manpages.
2009-12-19 14:38:41 +01:00
Tom G. Christensen
47cf7996bd topinstalldir=/ should work better now
Make auto_rel look for relnotes.$_os too
2009-12-19 14:38:41 +01:00
Tom G. Christensen
fa19ecb0d6 Another little nit with the metainstalldir handling.
metainstalldir=/ would mess things up.
2009-12-19 14:38:41 +01:00
Tom G. Christensen
c1b8bdc085 Off by one bug that would sometimes cause the sorting of the idb file to
be wrong (resulting in gendist complaining.)
2009-12-19 14:38:40 +01:00
Tom G. Christensen
de2bd7d63b - Support 'dir' command in pkgdef
- New metainstalldir for when topdir needs to be / (like prngd, openssh)
- Allow make install to be skipped in generic_install
2009-12-19 14:38:40 +01:00
Tom G. Christensen
9994bcd1e5 Add shortdesc.
Correct an oversight (sw.eoe->sw.base) from the last commit.
2009-12-19 14:38:40 +01:00
Tom G. Christensen
f65dca19aa Forgot one mkdir->$MKDIR during the last cleanup.
Made the $SED substitution a bit more readable.
2009-12-19 14:38:40 +01:00
Tom G. Christensen
b9c7b5c0ee Fix check_unpackaged. We didn't really need that CMP since all the work was
being done with cat | sort | uniq -u anyway.
2009-12-19 14:38:40 +01:00
Tom G. Christensen
e13ebe8b9f Add shortdesc functionality. This is a short text that is appended to the
product ID string.

Fix check_unpackaged. We didn't really need that CMP since all the work was
being done with cat | sort | uniq -u anyway.

Copy original sourcecode also in auto_src.

Fix prereq handling in create_spec().

Fix auto_rel to also work correctly when compiler is gcc 3.4.1
2009-12-19 14:38:40 +01:00
Tom G. Christensen
59657a656e We don't need CMP anymore.
Native Irix ln doesn't know about -n
2009-12-19 14:38:40 +01:00
Tom G. Christensen
410760a6d3 Introduce a new format for the automatically generated version field.
By extending it to a mandatory 8 digits and padding it with zeroes on the
right side it should be possible to avoid problems with version numbers
changing format.
This means  1.19.5->1.20 should be handled correctly now.

Add support for the new subsys.conf keyword (defalt/nodefault).

Flesh out the auto_rel function to help with release notes maintenance.
Added a relnotes.template.irix and make newpkg install a copy
into new sandboxes.
Also clean up newpkg a bit.

Fix a problem with the fix_man function and how to locate the man pages.
The problem was discoved when building gcc-3.4.1 into
$prefix=/usr/local/gcc-3.4.1 and still needing $topinstalldir
to be /usr/local. We now attempt to find any extra subdirs
needed by comparing $prefix and $topinstalldir.
2009-12-19 14:38:40 +01:00
Tom G. Christensen
08d497ad37 New subsystem names *again* and a new subsys.conf keyword.
It's now possible to designate install status, either default
or nodefault on each subsystem in subsys.conf
The pkgdef template was updated to reflect the changes in subsys.conf
2009-12-19 14:38:40 +01:00
Tom G. Christensen
87ae9aa1ff We don't need DIFF anymore.
Added new LN and PRINTF commands.
Replaced ln with $LN
Avoid namespace pollution in fix_man() by declaring all internal variables
local.
2009-12-19 14:38:40 +01:00
Tom G. Christensen
b2d56995a0 Great, native expr blows up if = is unqouted, gnu expr doesn't care.
Use -ne instead of ! -eq while we're at it.
2009-12-19 14:38:40 +01:00
Tom G. Christensen
a6559259a0 Fix adding of patches to opt.src
Add spec & idb files to a opt.dist subsystem
2009-12-19 14:38:40 +01:00
Tom G. Christensen
46d02dd6db New subsystems means a new image aswell 2009-12-19 14:38:40 +01:00
Tom G. Christensen
1e6993bca5 New subsystem conventions 2009-12-19 14:38:40 +01:00
Tom G. Christensen
ec325c188b Redefine the meaning of the topdir variable.
From now on pkgdir will be used to designate the toplevel dir of the pkg
under $BUILDPKG_BASE

Irix specific changes:
Source formatting fixes
Finally get rid of the FIXME on imageconf
Automatically handle opt.src and opt.relnotes subsystems
2009-12-19 14:38:40 +01:00
Tom G. Christensen
0a32c3529f Also install a copy of the pkgdef template when creating a new sandbox on
irix.
2009-12-19 14:38:40 +01:00
Tom G. Christensen
2ff1b5e084 Split strip function into system specific subfunctions.
After the rewrite of add_files in the Irix function library permissions
where not assigned correctly. This has been fixed.
2009-12-19 14:38:40 +01:00
Tom G. Christensen
5def702b56 Make the output from the unpackaged files check much more readable. 2009-12-19 14:38:40 +01:00
Tom G. Christensen
0958686fd0 Bring Irix into line with the latest changes
Now Irix also uses pkgdef and checks for unpackaged files in the stagedir.
subsys.conf will only contain descriptions like image.conf

What missing?
ops & depend functionality is untested

strip function needs to be either generalized or moved to the pr. pkgsystem
function libraries.

Perhaps introduce something like attr from RPM to set specific permissions
in pkgdef.
2009-12-19 14:38:40 +01:00
Tom G. Christensen
6ca155d0c4 Small fix for strip function.
It may or may not work on Irix. It depends on what /usr/bin/file returns
on Irix.
2009-12-19 14:38:40 +01:00
Tom G. Christensen
de840b7038 One more attempt at fixing the parse_def logic.
New defaults needed by the enhanced strip function
2009-12-19 14:38:40 +01:00
Tom G. Christensen
3faeac8b79 Made the strip function more intelligent by ripping the brp-strip-*
scripts from RPM.
2009-12-19 14:38:40 +01:00
Tom G. Christensen
c6b27e50fe Make doc function handle parameters with wildcards in them.
Using tar the way it's currently done is kinda ugly...
Fix _docdir default location to $prefix/share/doc instead of $prefix/doc
2009-12-19 14:38:40 +01:00
Tom G. Christensen
152a6acd21 Fix a very subtle gotcha in the pkgdef definition.
If the last (or only) section in a pkgdef file didn't end with a blank
line then the 'section end' actions wouldn't be performed.
The 'section end' marker is still a *single* blank line and if there are
multiple sections in a pkgdef they *must* be seperated by such a line.
2009-12-19 14:38:40 +01:00
Tom G. Christensen
6d88b4bd9e Make check_unpackaged list the diff so one can actually see what's
missing :)
2009-12-19 14:35:08 +01:00
Tom G. Christensen
938abe7cd9 Missing $_<dir> helper var 2009-12-19 14:35:08 +01:00
Tom G. Christensen
9409cc9282 Add a template for the pkgdef file and make sure newpkg places a copy in
the new metadir
2009-12-19 14:35:08 +01:00
Tom G. Christensen
d15a078371 Add helper functions to extract PKG and PSTAMP from pkginfo files
Fix list_pkgs so it actually works the way it was intended
Fix make_pkg to use the fixed list_pkgs
Remove old prototype function and PKGPROTO helper var
Add 'depend' support to add_scripts
Bash 2.03 needs (()) expansion in quotes in parse_def to avoid
a syntax error
Use $AWK instead of awk
2009-12-19 14:35:08 +01:00