Support for AIX native (.bff) packages: patch available

Ben Lindstrom mouring at etoh.eviladmin.org
Sun Mar 3 05:07:46 EST 2002


Since I don't have AIX I can't test this.  But this is a quick script
to automate building your inventory file.  If I knew what type of
checksum it wanted I would throw the code in (see attachment).

However, you should beable to extract out the $PREFIX by doing like:
PREFIX=`grep "^prefix=" Makefile | cut -d = -f 2`

And the script should be pretty much be automated.  Allowing the package
builder to build to their --prefix targed location.

We are getting close to 3.1 release.. so I think this will have to
go in at the start of 3.2.  Unless Damien and Markus think that
this is an non-issue and I'll important the current version now.

- Ben
-------------- next part --------------
find fake/ -ls | awk '{\
			if (NR != 1) {\
				## Encode permissions in oct
				u=0; g=0; o=0;\
				if (substr($3,2,1) == "r") u=u+4;\
				if (substr($3,3,1) == "w") u=u+2;\
				if (substr($3,4,1) == "x") u=u+1;\
				if (substr($3,5,1) == "r") g=g+4;\
				if (substr($3,6,1) == "w") g=g+2;\
				if (substr($3,7,1) == "x") g=g+1;\
				if (substr($3,8,1) == "r") o=o+4;\
				if (substr($3,9,1) == "w") o=o+2;\
				if (substr($3,10,1) == "x") o=o+1;\

				## Start to display inventory information
				print substr($11, 5, length($11) - 1)":";\
				print "\tclass=apply,inventory,openssh";\
				print "\towner=root";\
				print "\tgroup=system";\
				print "\tmode="u""g""o;\
				if (substr($3, 0, 1) == "-") {
					## Entry is File
					print "\ttype=FILE";\
					print "\tsize="$7;\
					## One should system() out do a checksum
					print "\tchecksum=VOLATILE";\
				} else if (substr($3, 0, 1) == "l") { \
					## Entry is SymLink
					print "\ttype=SYMLINK";\
					print "\ttarget="$13;\
				} else {\
					## Entry Assumed (wrongly?) Directory
					print "\ttype=DIRECTORY";\
				}\
			}\
		  }'




More information about the openssh-unix-dev mailing list