Thread: [Abtlinux-svn] SF.net SVN: abtlinux: [494] src/trunk (Page 7)
Status: Alpha
Brought to you by:
eschabell
From: <esc...@us...> - 2008-01-28 15:39:24
|
Revision: 494 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=494&view=rev Author: eschabell Date: 2008-01-28 07:39:29 -0800 (Mon, 28 Jan 2008) Log Message: ----------- Removed an old feature to show patches (from arch as repo idea time). Furthermore, added solution to running abt -h as non-root user, failing on missing logging permissions. Modified Paths: -------------- src/trunk/abt.rb src/trunk/libs/abtusage.rb Modified: src/trunk/abt.rb =================================================================== --- src/trunk/abt.rb 2008-01-28 10:00:50 UTC (rev 493) +++ src/trunk/abt.rb 2008-01-28 15:39:29 UTC (rev 494) @@ -83,15 +83,16 @@ system("svn export #{$ABTLINUX_MAIN_CONFIG} #{configfile}") end + # should be installed, load config. + $LOAD_PATH.unshift "#{$DEFAULT_PREFIX}/etc/abt/" + load 'abtconfig.rb' + if File.exist?("#{$DEFAULT_PREFIX}/etc/abt/local/localconfig.rb") $LOAD_PATH.unshift maxconfigpath load 'localconfig.rb' end end -# should be installed, load config. -$LOAD_PATH.unshift "#{$DEFAULT_PREFIX}/etc/abt/" -load 'abtconfig.rb' # Check for missing default packages path, if needed install them. # @@ -111,6 +112,23 @@ system("svn --force export #{$ABTLINUX_PACKAGES} #{$PACKAGE_PATH}") end +# Chick for missing logging paths, if needed install them. +# +if (!File.directory?($ABT_LOGS) || (Dir.entries($ABT_LOGS) - ['.', '..']).empty?) + puts "\nMissing our main logging directory at #{$ABT_LOGS}" + puts "Maybe time for an abt update? Let us try to fix it for you!" + + # check for root login. + if (Process.uid != 0) + puts "\nMust be root to fix missing logging paths." + exit + else + initializeAllAbtlinuxPaths = AbtLogManager.new + puts "\nCreated missing logging paths: #{$ABT_LOGS} and other general paths." + puts "\n\n" + end +end + ## # Setup needed classes and get ready to parse arguments. ## @@ -120,12 +138,7 @@ system = AbtSystemManager.new options = Hash.new show = AbtUsage.new -myLogger = AbtLogManager.new # initializes all ABT directories if missing. -# setup timestamp. -logger = Logger.new($JOURNAL) # initializes all needed paths. -logger.datetime_format = "%Y-%m-%d %H:%M:%S " - # deal with usage request. if (ARGV.length == 0 || (ARGV.length == 1 && (ARGV[0] == '--help' || ARGV[0] == '-h' || ARGV[0].downcase == 'help'))) show.usage("all") @@ -135,6 +148,14 @@ # login as root for the rest. manager.root_login(ARGV) +# this initializes all needed ABT directories if missing. +myLogger = AbtLogManager.new + +# setup timestamp. +logger = Logger.new($JOURNAL) # initializes all needed paths. +logger.datetime_format = "%Y-%m-%d %H:%M:%S " + + # And loading local file if found. if File.exist?("#{$DEFAULT_PREFIX}/etc/abt/local/localconfig.rb") load "#{$DEFAULT_PREFIX}/etc/abt/local/localconfig.rb" @@ -456,11 +477,6 @@ when "show-iqueue" reporter.show_queue("install") -when "show-patches" - # FIXME : show patches implementation. - puts "Display currently available patches for installed package tree." - show.usage("queries") - when "show-updates" # FIXME : show updates implementation. puts "Display package listing with available update versions." Modified: src/trunk/libs/abtusage.rb =================================================================== --- src/trunk/libs/abtusage.rb 2008-01-28 10:00:50 UTC (rev 493) +++ src/trunk/libs/abtusage.rb 2008-01-28 15:39:29 UTC (rev 494) @@ -107,7 +107,6 @@ puts " show-untracked\t\t\tShow all files on system not tracked by AbTLinux." puts " show-journal\t\t\t\tShow the system journal." puts " show-iqueue\t\t\t\tShow the contents of the install queue." - puts " show-patches\t\t\t\tShow the current available patches for installed package tree.\n" end ## This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2008-02-04 11:51:54
|
Revision: 513 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=513&view=rev Author: eschabell Date: 2008-02-04 03:51:52 -0800 (Mon, 04 Feb 2008) Log Message: ----------- Refactored to expand configure step to setup our build in a more uniform way. Modified Paths: -------------- src/trunk/abtconfig.rb src/trunk/libs/abtpackage.rb Modified: src/trunk/abtconfig.rb =================================================================== --- src/trunk/abtconfig.rb 2008-02-03 23:39:06 UTC (rev 512) +++ src/trunk/abtconfig.rb 2008-02-04 11:51:52 UTC (rev 513) @@ -64,6 +64,11 @@ $ABT_VERSION = "0.2" $BUILD_ARCHITECTURE = "-march=i486" # i486 $BUILD_OPTIMIZATIONS = "-O2 -Os " # fast, small +$BUILD_PREFIX = "#{$DEFAULT_PREFIX}/usr" +$BUILD_SYSCONFDIR = "#{$DEFAULT_PREFIX}/etc" +$BUILD_LOCALSTATEDIR = "#{$DEFAULT_PREFIX}/var" +$BUILD_MANDIR = "#{$DEFAULT_PREFIX}/usr/share/man" +$BUILD_INFODIR = "#{$DEFAULT_PREFIX}/usr/share/info" $REMOVE_BUILD_SOURCES = true $TIMESTAMP = Time.now.strftime( "%Y-%m-%d %H:%M:%S (%Z)" ) Modified: src/trunk/libs/abtpackage.rb =================================================================== --- src/trunk/libs/abtpackage.rb 2008-02-03 23:39:06 UTC (rev 512) +++ src/trunk/libs/abtpackage.rb 2008-02-04 11:51:52 UTC (rev 513) @@ -247,9 +247,19 @@ ## def configure(verbose=true) if (verbose) - command = "./configure --prefix=#{$DEFAULT_PREFIX} | tee #{$PACKAGE_INSTALLED}/#{@srcDir}/#{@srcDir}.configure" + command = "./configure --prefix=#{$BUILD_PREFIX} \ + --sysconfdir=#{$BUILD_SYSCONFDIR} \ + --localstatedir=#{$BUILD_LOCALSTATEDIR} \ + --mandir=#{$BUILD_MANDIR} \ + --infodir=#{$BUILD_INFODIR} \ + | tee #{$PACKAGE_INSTALLED}/#{@srcDir}/#{@srcDir}.configure" else - command = "./configure --prefix=#{$DEFAULT_PREFIX} 1> #{$PACKAGE_INSTALLED}/#{@srcDir}/#{@srcDir}.configure 2>&1" + command = "./configure --prefix=#{$BUILD_PREFIX} \ + --sysconfdir=#{$BUILD_SYSCONFDIR} \ + --localstatedir=#{$BUILD_LOCALSTATEDIR} \ + --mandir=#{$BUILD_MANDIR} \ + --infodir=#{$BUILD_INFODIR} \ + 1> #{$PACKAGE_INSTALLED}/#{@srcDir}/#{@srcDir}.configure 2>&1" end Dir.chdir("#{$BUILD_LOCATION}/#{@srcDir}") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2008-02-04 12:00:30
|
Revision: 514 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=514&view=rev Author: eschabell Date: 2008-02-04 04:00:26 -0800 (Mon, 04 Feb 2008) Log Message: ----------- Added the host build options for configure step. Modified Paths: -------------- src/trunk/abtconfig.rb src/trunk/libs/abtpackage.rb Modified: src/trunk/abtconfig.rb =================================================================== --- src/trunk/abtconfig.rb 2008-02-04 11:51:52 UTC (rev 513) +++ src/trunk/abtconfig.rb 2008-02-04 12:00:26 UTC (rev 514) @@ -62,8 +62,9 @@ # default config options. # $ABT_VERSION = "0.2" -$BUILD_ARCHITECTURE = "-march=i486" # i486 -$BUILD_OPTIMIZATIONS = "-O2 -Os " # fast, small +$BUILD_ARCHITECTURE = "-march=i486" # i486 +$BUILD_OPTIMIZATIONS = "-O2 -Os " # fast, small +$BUILD_HOST = "i486-pc-linux-gnu" # i486 $BUILD_PREFIX = "#{$DEFAULT_PREFIX}/usr" $BUILD_SYSCONFDIR = "#{$DEFAULT_PREFIX}/etc" $BUILD_LOCALSTATEDIR = "#{$DEFAULT_PREFIX}/var" Modified: src/trunk/libs/abtpackage.rb =================================================================== --- src/trunk/libs/abtpackage.rb 2008-02-04 11:51:52 UTC (rev 513) +++ src/trunk/libs/abtpackage.rb 2008-02-04 12:00:26 UTC (rev 514) @@ -247,18 +247,22 @@ ## def configure(verbose=true) if (verbose) - command = "./configure --prefix=#{$BUILD_PREFIX} \ - --sysconfdir=#{$BUILD_SYSCONFDIR} \ + command = "./configure --prefix=#{$BUILD_PREFIX} \ + --sysconfdir=#{$BUILD_SYSCONFDIR} \ --localstatedir=#{$BUILD_LOCALSTATEDIR} \ - --mandir=#{$BUILD_MANDIR} \ - --infodir=#{$BUILD_INFODIR} \ + --mandir=#{$BUILD_MANDIR} \ + --infodir=#{$BUILD_INFODIR} \ + --host=#{$BUILD_HOST} \ + --build=#{$BUILD_HOST} \ | tee #{$PACKAGE_INSTALLED}/#{@srcDir}/#{@srcDir}.configure" else - command = "./configure --prefix=#{$BUILD_PREFIX} \ - --sysconfdir=#{$BUILD_SYSCONFDIR} \ + command = "./configure --prefix=#{$BUILD_PREFIX} \ + --sysconfdir=#{$BUILD_SYSCONFDIR} \ --localstatedir=#{$BUILD_LOCALSTATEDIR} \ - --mandir=#{$BUILD_MANDIR} \ - --infodir=#{$BUILD_INFODIR} \ + --mandir=#{$BUILD_MANDIR} \ + --infodir=#{$BUILD_INFODIR} \ + --host=#{$BUILD_HOST} \ + --build=#{$BUILD_HOST} \ 1> #{$PACKAGE_INSTALLED}/#{@srcDir}/#{@srcDir}.configure 2>&1" end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <esc...@us...> - 2008-02-11 15:13:54
|
Revision: 523 http://abtlinux.svn.sourceforge.net/abtlinux/?rev=523&view=rev Author: eschabell Date: 2008-02-11 07:13:59 -0800 (Mon, 11 Feb 2008) Log Message: ----------- Refactored for some proper default compiler optimizations, this propogated to the bash package. Modified Paths: -------------- src/trunk/abtconfig.rb src/trunk/libs/abtpackage.rb src/trunk/packages/bash.rb Modified: src/trunk/abtconfig.rb =================================================================== --- src/trunk/abtconfig.rb 2008-02-04 22:29:19 UTC (rev 522) +++ src/trunk/abtconfig.rb 2008-02-11 15:13:59 UTC (rev 523) @@ -62,9 +62,11 @@ # default config options. # $ABT_VERSION = "0.2" -$BUILD_ARCHITECTURE = "-march=i486" # i486 -$BUILD_OPTIMIZATIONS = "-O2 -Os " # fast, small -$BUILD_HOST = "i486-pc-linux-gnu" # i486 +$BUILD_ARCH = "-march=pentium2" # i686, pentium II. +$BUILD_SIZE = "-Os" # optimize for size. +$BUILD_NODEBUG = "-fomit-frame-pointer" # removes debug info. +$BUILD_SPEEDY = "-pipe" # faster compile, pipes into next function instead of temp files. +$BUILD_CFLAGS = "#{$BUILD_ARCH} #{$BUILD_SIZE} #{$BUILD_SPEEDY} #{$BUILD_NODEBUG}" # all our build options. $BUILD_PREFIX = "#{$DEFAULT_PREFIX}/usr" $BUILD_SYSCONFDIR = "#{$DEFAULT_PREFIX}/etc" $BUILD_LOCALSTATEDIR = "#{$DEFAULT_PREFIX}/var" Modified: src/trunk/libs/abtpackage.rb =================================================================== --- src/trunk/libs/abtpackage.rb 2008-02-04 22:29:19 UTC (rev 522) +++ src/trunk/libs/abtpackage.rb 2008-02-11 15:13:59 UTC (rev 523) @@ -252,8 +252,6 @@ --localstatedir=#{$BUILD_LOCALSTATEDIR} \ --mandir=#{$BUILD_MANDIR} \ --infodir=#{$BUILD_INFODIR} \ - --host=#{$BUILD_HOST} \ - --build=#{$BUILD_HOST} \ | tee #{$PACKAGE_INSTALLED}/#{@srcDir}/#{@srcDir}.configure" else command = "./configure --prefix=#{$BUILD_PREFIX} \ @@ -261,14 +259,17 @@ --localstatedir=#{$BUILD_LOCALSTATEDIR} \ --mandir=#{$BUILD_MANDIR} \ --infodir=#{$BUILD_INFODIR} \ - --host=#{$BUILD_HOST} \ - --build=#{$BUILD_HOST} \ 1> #{$PACKAGE_INSTALLED}/#{@srcDir}/#{@srcDir}.configure 2>&1" end Dir.chdir("#{$BUILD_LOCATION}/#{@srcDir}") - if !system(command) + # set our optimizations before configuring. + $cflags = "CFLAGS=" + '"' + $BUILD_CFLAGS + '"' + puts "Using the following optimizations: export #{$cflags}\n" + + # now configure. + if !system("export #{$cflags}; export CXXFLAGS='${CFLAGS}'; #{command}") puts "[AbtPackage.configure] - configure section failed, exit code was #{$?.exitstatus}." return false end Modified: src/trunk/packages/bash.rb =================================================================== --- src/trunk/packages/bash.rb 2008-02-04 22:29:19 UTC (rev 522) +++ src/trunk/packages/bash.rb 2008-02-11 15:13:59 UTC (rev 523) @@ -141,15 +141,12 @@ # otherwise false. ## def configure(verbose=true) - # create our bash.static, never want to be without it! - if (verbose) + if (verbose) command = "./configure --prefix=#{$BUILD_PREFIX} \ --sysconfdir=#{$BUILD_SYSCONFDIR} \ --localstatedir=#{$BUILD_LOCALSTATEDIR} \ --mandir=#{$BUILD_MANDIR} \ --infodir=#{$BUILD_INFODIR} \ - --host=#{$BUILD_HOST} \ - --build=#{$BUILD_HOST} \ --enable-static-link \ --with-bash-malloc=no \ | tee #{$PACKAGE_INSTALLED}/#{@srcDir}/#{@srcDir}.configure" @@ -159,90 +156,23 @@ --localstatedir=#{$BUILD_LOCALSTATEDIR} \ --mandir=#{$BUILD_MANDIR} \ --infodir=#{$BUILD_INFODIR} \ - --host=#{$BUILD_HOST} \ - --build=#{$BUILD_HOST} \ --enable-static-link \ --with-bash-malloc=no \ 1> #{$PACKAGE_INSTALLED}/#{@srcDir}/#{@srcDir}.configure 2>&1" end - + Dir.chdir("#{$BUILD_LOCATION}/#{@srcDir}") - if !system(command) - puts "[bash.rb] - configure section failed during static bash configure, exit code was #{$?.exitstatus}." - return false - end - - if !system("make bash DESTDIR=#{$DEFAULT_PREFIX}") - puts "[bash.rb] - configure section failed during static bash build, exit code was #{$?.exitstatus}." - return false - end + # set our optimizations before configuring. + $cflags = "CFLAGS=" + '"' + $BUILD_CFLAGS + '"' + puts "Using the following optimizations: export #{$cflags}\n" - if !(system("mv bash bash.static")) - puts "[bash.rb] - configure section failed during copy of bash.static, exit code was #{$?.exitstatus}." - return false - end - - if !(system("make clean")) - puts "[bash.rb] - configure section failed during make clean, exit code was #{$?.exitstatus}." - return false - end - - # now configure for normal bash build. - if (verbose) - command = "./configure --prefix=#{$BUILD_PREFIX} \ - --sysconfdir=#{$BUILD_SYSCONFDIR} \ - --localstatedir=#{$BUILD_LOCALSTATEDIR} \ - --mandir=#{$BUILD_MANDIR} \ - --infodir=#{$BUILD_INFODIR} \ - --host=#{$BUILD_HOST} \ - --build=#{$BUILD_HOST} \ - --enable-static-link \ - --with-bash-malloc=no \ - | tee #{$PACKAGE_INSTALLED}/#{@srcDir}/#{@srcDir}.configure" - else - command = "./configure --prefix=#{$BUILD_PREFIX} \ - --sysconfdir=#{$BUILD_SYSCONFDIR} \ - --localstatedir=#{$BUILD_LOCALSTATEDIR} \ - --mandir=#{$BUILD_MANDIR} \ - --infodir=#{$BUILD_INFODIR} \ - --host=#{$BUILD_HOST} \ - --build=#{$BUILD_HOST} \ - --enable-static-link \ - --with-bash-malloc=no \ - 1> #{$PACKAGE_INSTALLED}/#{@srcDir}/#{@srcDir}.configure 2>&1" - end - - if !system(command) + # now configure. + if !system("export #{$cflags}; export CXXFLAGS='${CFLAGS}'; #{command}") puts "[bash.rb] - configure section failed during bash configure, exit code was #{$?.exitstatus}." return false end return true end - - ## - # Any actions needed before the installation can occur will happen here, - # so we are installing a bash.static binary to our sbin directory. Note that - # this is an untracked file so that it never gets removed, just over written - # should the package be installed again. We never want a system without - # bash. - # - # <b>PARAM</b> <i>boolean</i> - true if you want to see the verbose output, - # otherwise false. Defaults to true. - # - # <b>RETURNS:</b> <i>boolean</i> - True if the completes sucessfully, - # otherwise false. - ## - def preinstall(verbose=true) - # install static bash - Dir.chdir("#{$BUILD_LOCATION}/#{@srcDir}") - - if (!system("install -D -m 755 bash.static #{$DEFAULT_PREFIX}/sbin/bash.static")) - puts "[bash.rb] - preinstall section failed during bash.static install, exit code was #{$?.exitstatus}." - return false - end - - return true; - end end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |