From: lace <> Date: Thu, 29 Dec 2005 06:07:22 +0000 (+0000) Subject: +project staticbuild X-Git-Url: http://git.jankratochvil.net/?p=www.jankratochvil.net.git;a=commitdiff_plain;h=f4b45ecf5581c3d4fcfb57a4851a9f0fa4d1e5f3 +project staticbuild --- diff --git a/configure.ac b/configure.ac index d3decd2..af4386d 100644 --- a/configure.ac +++ b/configure.ac @@ -128,6 +128,7 @@ Makefile ./project/netdnsspoof/Makefile ./project/xbelnormalize/Makefile ./project/inetdmx/Makefile +./project/staticbuild/Makefile ]) echo done. diff --git a/project/Makefile.am b/project/Makefile.am index bb3527b..d491573 100644 --- a/project/Makefile.am +++ b/project/Makefile.am @@ -90,7 +90,8 @@ SUBDIRS= \ harpy \ netdnsspoof \ xbelnormalize \ - inetdmx + inetdmx \ + staticbuild SUBDIRS: Makefile @echo $(SUBDIRS) >$@ diff --git a/project/staticbuild/Index.pm b/project/staticbuild/Index.pm new file mode 100644 index 0000000..1059c96 --- /dev/null +++ b/project/staticbuild/Index.pm @@ -0,0 +1,148 @@ +# $Id$ +# Main page of 'My::Project::staticbuild' +# Copyright (C) 2005 Jan Kratochvil +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; exactly version 2 of June 1991 is required +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +package project::staticbuild::Index; +require 5.6.0; # at least 'use warnings;' but we need some 5.6.0+ modules anyway +our $VERSION=do { my @r=(q$Revision$=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; }; +our $CVS_ID=q$Id$; +use strict; +use warnings; + +use My::Web; +Wuse 'project::Lib'; + + +our @ListItem=( + "name"=>"staticbuild", + "platform"=>"unixdevel", + "priority"=>495, + "download-source patches"=>"dist/staticbuild-2005-12-28-00.tar.gz", + "download-Fedora Core 4 i386 binaries"=>"dist/staticbuild-2005-12-28-00-bin.tar.gz", + "summary"=>"Fully static binaries build - GNU/Linux vendor independence", + "license"=>"GPL", + "maintenance"=>"ready", + "language"=>"C", + "description"=><<"HERE", +

There exists too many GNU/Linux distributions - vendors - and any produced +binary is not compatible with all of them due to the shared libraries and +configuration files dependencies. Due to many hardcoded shared libraries it is +no longer possible to just use gcc -static. These patches provide the +functionality you would expect from: gcc -static

+HERE + ); + +sub handler +{ +project::Lib->init(); + + +print <<"HERE"; +

This static build framework is based on @{[ a_href 'http://fedora.redhat.com/','Fedora Core' ]} 4 +(@{[ a_href 'http://download.fedora.redhat.com/pub/fedora/linux/core/4/SRPMS/','SRPMS' ]} +and @{[ a_href 'http://download.fedora.redhat.com/pub/fedora/linux/core/updates/4/SRPMS/','SRPMS updates' ]}). +In fact it is not important which distribution the static build is based on as the final binaries +should run on any GNU/Linux system vendor/version. Just I decided for +@{[ a_href 'http://fedora.redhat.com/','Fedora Core' ]}.

+

You must use the same package versions on the main (dynamic) build system +as the static libraries are built for! Therefore you must use +@{[ a_href 'http://fedora.redhat.com/','Fedora Core' ]} 4 if using the +unchanged sources or even the binaries provided here.

+

This static build does not provide threading - neither POSIX threads nor LinuxThreads. +I did not need it anywhere and it gets everything simpler and smaller this way.

+

You should build your sources statically (using automake(1) --enable-static) +although without gcc -static. As the last step you should relink the binaries against +this staticbuild libraries by hand - it is not much possible to convince +automake(1) to properly relink it the minized way for you. Check the +'@{[ a_href 'http://cvs.jankratochvil.net/viewcvs/captive/build-static?rev=HEAD','build-static' ]}' +script for an example.

+

This package has been used in its current or former versions for my projects:

+HERE +sub projectname($) +{ +my($name)=@_; + + return a_href "/project/$name/",project::Lib->title(project::Lib->name_to_hashref($name)); +} +print <<"HERE"; + +HERE + + +my $gnome="http://bugzilla.gnome.org/show_bug.cgi?id="; +my $sources="http://sources.redhat.com/bugzilla/show_bug.cgi?id="; + +sub bug($$$) +{ +my($prefix,$id,$desc)=@_; + + return "Bug ".a_href($prefix.$id,$id)." - $desc"; +} + +my @bugs=( + "GConf2-2.10.0-4"=>[], + "atk-1.9.1-1"=>[], + "fontconfig-2.2.3-13"=>[], + "fuse-2.4.2-2.fc4"=>[], + "glib2-2.6.6-1"=>[], + "glibc-2.3.5-10.3"=>[ + bug($sources,1043,"--enable-static-nss false warnings"), + bug($sources,1044,'--enable-static-nss nsswitch "compat"'), + bug($sources,1045,"new --enable-static-gconv"), + ], + "gnome-vfs2-2.10.0-5"=>[ + bug($gnome, 47053,"new --with-included-filesystems"), + ], + "gtk2-2.6.10-2.fc4.4"=>[], + "libbonobo-2.8.1-1"=>[ + bug($gnome,309504,"new --disable-threads"), + ], + "libgnome-2.10.0-3"=>[], + "libxml2-2.6.20-1.FC4"=>[], + "pango-1.8.1-2"=>[], + "xorg-x11-6.8.2-37.FC4.49.2"=>[], + ); + + +print <<"HERE"; + + +HERE +while (@bugs) { + my $package=shift @bugs; + my @buglist=@{shift @bugs}; + print "\t".'"; + # BEWARE: Wrong code indentation: + if (@buglist) { + print ""; + print "\t"."\n" for @buglist; + } + else { + print "\t".''."\n"; + } + } +print <<"HERE"; +
Patched PackagePatches Submitted as Bugs
'.$package."".shift(@buglist)."
$_
-
+HERE + + +exit; +} +1; diff --git a/project/staticbuild/Makefile.am b/project/staticbuild/Makefile.am new file mode 100644 index 0000000..ebc4907 --- /dev/null +++ b/project/staticbuild/Makefile.am @@ -0,0 +1,23 @@ +# $Id$ +# automake source for the Makefile of project/staticbuild/ subdir +# Copyright (C) 2004 Jan Kratochvil +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; exactly version 2 of June 1991 is required +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +include $(top_srcdir)/Makefile-head.am + +MODPERL_PM+= \ + Index.pm + diff --git a/project/staticbuild/dist/staticbuild-2005-12-28-00-bin.tar.gz b/project/staticbuild/dist/staticbuild-2005-12-28-00-bin.tar.gz new file mode 100644 index 0000000..063cdea Binary files /dev/null and b/project/staticbuild/dist/staticbuild-2005-12-28-00-bin.tar.gz differ diff --git a/project/staticbuild/dist/staticbuild-2005-12-28-00.tar.gz b/project/staticbuild/dist/staticbuild-2005-12-28-00.tar.gz new file mode 100644 index 0000000..cb7bb64 Binary files /dev/null and b/project/staticbuild/dist/staticbuild-2005-12-28-00.tar.gz differ diff --git a/project/udpgate/Index.pm b/project/udpgate/Index.pm index 7e1c0f8..9c17bf1 100644 --- a/project/udpgate/Index.pm +++ b/project/udpgate/Index.pm @@ -53,6 +53,24 @@ HERE sub handler { project::Lib->init(); + + +sub projectname($) +{ +my($name)=@_; + + return a_href "/project/$name/",project::Lib->title(project::Lib->name_to_hashref($name)); +} + +print <<"HERE"; +

Package 'build-udpgate-static' above is in fact obsolete, for further versions it will +get replaced by the target project neutral:

+
+

@{[ projectname "staticbuild" ]}

+
+HERE + + exit; } 1;