epmfile.pm (c9717572) epmfile.pm (60203e34)
1#**************************************************************
2#
3# Licensed to the Apache Software Foundation (ASF) under one
4# or more contributor license agreements. See the NOTICE file
5# distributed with this work for additional information
6# regarding copyright ownership. The ASF licenses this file
7# to you under the Apache License, Version 2.0 (the
8# "License"); you may not use this file except in compliance

--- 871 unchanged lines hidden (view full) ---

880}
881
882#################################################
883# LD_PRELOAD string for Debian packages
884#################################################
885
886sub get_ld_preload_string
887{
1#**************************************************************
2#
3# Licensed to the Apache Software Foundation (ASF) under one
4# or more contributor license agreements. See the NOTICE file
5# distributed with this work for additional information
6# regarding copyright ownership. The ASF licenses this file
7# to you under the Apache License, Version 2.0 (the
8# "License"); you may not use this file except in compliance

--- 871 unchanged lines hidden (view full) ---

880}
881
882#################################################
883# LD_PRELOAD string for Debian packages
884#################################################
885
886sub get_ld_preload_string
887{
888 my ($includepatharrayref) = @_;
889
890 my $getuidlibraryname = "getuid.so";
891
892 my $ldpreloadstring;
893
894 my $getuidlibraryref = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$getuidlibraryname, $includepatharrayref, 0);
895
896 if (($ENV{'FAKEROOT'} ne "no") && ($ENV{'FAKEROOT'} ne "")) {
897
898 $ldpreloadstring = $ENV{'FAKEROOT'};
899
900 } else {
901
902 if ($$getuidlibraryref eq "") { installer::exiter::exit_program("ERROR: Could not find $getuidlibraryname!", "get_ld_preload_string"); }
903
904 my $ldpreloadstring = "LD_PRELOAD=" . $$getuidlibraryref;
905 }
906
907 return $ldpreloadstring;
888 return $ENV{'FAKEROOT'};
908}
909
910#################################################
911# Calling epm to create the installation sets
912#################################################
913
914sub call_epm
915{

--- 5 unchanged lines hidden (view full) ---

921
922 my $localpackagename = $packagename;
923 # Debian allows only lowercase letters in package name
924 if ( $installer::globals::debian ) { $localpackagename = lc($localpackagename); }
925
926 my $outdirstring = "";
927 if ( $installer::globals::epmoutpath ne "" ) { $outdirstring = " --output-dir $installer::globals::epmoutpath"; }
928
889}
890
891#################################################
892# Calling epm to create the installation sets
893#################################################
894
895sub call_epm
896{

--- 5 unchanged lines hidden (view full) ---

902
903 my $localpackagename = $packagename;
904 # Debian allows only lowercase letters in package name
905 if ( $installer::globals::debian ) { $localpackagename = lc($localpackagename); }
906
907 my $outdirstring = "";
908 if ( $installer::globals::epmoutpath ne "" ) { $outdirstring = " --output-dir $installer::globals::epmoutpath"; }
909
929 # Debian package build needs fakeroot or our LD_PRELOAD hack for correct rights
910 # Debian package build needs fakeroot which we check for at configure time
930 # NOTE: EPM 5.0.0 or later also uses fakeroot w/ dpkg if available
931
932 my $ldpreloadstring = "";
933
911 # NOTE: EPM 5.0.0 or later also uses fakeroot w/ dpkg if available
912
913 my $ldpreloadstring = "";
914
934 if ( $installer::globals::debian ) { $ldpreloadstring = get_ld_preload_string($includepatharrayref) . " "; }
915 if ( $installer::globals::debian ) { $ldpreloadstring = get_ld_preload_string() . " "; }
935
936 my $extraflags = "";
916
917 my $extraflags = "";
937 if ($ENV{'EPM_FLAGS'}) { $extraflags = $ENV{'EPM_FLAGS'}; }
918 if ($ENV{'EPM_FLAGS'}) { $extraflags = $ENV{'EPM_FLAGS'}; }
938
939 my $verboseflag = "-v";
940 if ( ! $installer::globals::quiet ) { $verboseflag = "-v2"; };
941
942 my $systemcall = $ldpreloadstring . $epmname . " -f " . $packageformat . " " . $extraflags . " " . $localpackagename . " " . $epmlistfilename . $outdirstring . " " . $verboseflag . " " . " 2\>\&1 |";
943
944 $installer::logger::Info->printf("... %s ...\n", $systemcall);
945

--- 2414 unchanged lines hidden ---
919
920 my $verboseflag = "-v";
921 if ( ! $installer::globals::quiet ) { $verboseflag = "-v2"; };
922
923 my $systemcall = $ldpreloadstring . $epmname . " -f " . $packageformat . " " . $extraflags . " " . $localpackagename . " " . $epmlistfilename . $outdirstring . " " . $verboseflag . " " . " 2\>\&1 |";
924
925 $installer::logger::Info->printf("... %s ...\n", $systemcall);
926

--- 2414 unchanged lines hidden ---