Recent

Author Topic: create_*_deb.sh  (Read 2762 times)

Abelisto

  • Jr. Member
  • **
  • Posts: 91
create_*_deb.sh
« on: May 25, 2017, 09:37:48 pm »
I am sorry, I confused a bit with Lazarus bug tracker, so I posted it here...

In files create_fpc_deb.sh and create_lazarus_deb.sh

Code: Bash  [Select][+][-]
  1. #------------------------------------------------------------------------------
  2. # fixing permissions
  3. echo "fixing permissions ..."
  4. find $FPCBuildDir -type d -print0 | xargs -0 chmod 755  # this is needed, don't ask me why
  5. find $FPCBuildDir -type f -print0 | xargs -0 chmod a+r  # this is needed, don't ask me why
  6. find $FPCBuildDir -perm 775 | xargs -d '\n' chmod 755
  7. find $FPCBuildDir -perm 664 | xargs -d '\n' chmod 644
and

Code: Bash  [Select][+][-]
  1. # fixing permissions
  2. echo "fixing permissions ..."
  3. find $LazBuildDir -type d | xargs -d '\n' chmod 755
  4. find $LazBuildDir -perm 775 | xargs -d '\n'  chmod 755
  5. find $LazBuildDir -perm 664 | xargs -d '\n'  chmod 644

should be

Code: Bash  [Select][+][-]
  1. #------------------------------------------------------------------------------
  2. # fixing permissions
  3. echo "fixing permissions ..."
  4. find $FPCBuildDir -type d -print0 | xargs -0 -r chmod 755  # this is needed, don't ask me why
  5. find $FPCBuildDir -type f -print0 | xargs -0 -r chmod a+r  # this is needed, don't ask me why
  6. find $FPCBuildDir -perm 775 | xargs -d '\n' -r chmod 755
  7. find $FPCBuildDir -perm 664 | xargs -d '\n' -r chmod 644
and

Code: Bash  [Select][+][-]
  1. # fixing permissions
  2. echo "fixing permissions ..."
  3. find $LazBuildDir -type d | xargs -d '\n' -r chmod 755
  4. find $LazBuildDir -perm 775 | xargs -d '\n' -r  chmod 755
  5. find $LazBuildDir -perm 664 | xargs -d '\n' -r  chmod 644

(
  -r, --no-run-if-empty        if there are no arguments, then do not run COMMAND;
                                 if this option is not given, COMMAND will be
                                 run at least once

)

because it failed if no files found. For example:
...
fixing permissions ...
+ find /home/nd/tmp/fpc_patchdir/fpc_build -type d -print0
+ xargs -0 chmod 755
+ xargs -0 chmod a+r
+ find /home/nd/tmp/fpc_patchdir/fpc_build -type f -print0
+ find /home/nd/tmp/fpc_patchdir/fpc_build -perm 775
+ xargs -d '\n' chmod 755
chmod: missing operand after ‘755’
Try 'chmod --help' for more information.
nd@home ~/dev/lazarus/tools/install $



And also why it is necessary to change files mode in the current dir when everything happenings in the  ~/tmp dir?
« Last Edit: May 25, 2017, 11:43:04 pm by Abelisto »
OS: Linux Mint + MATE, Compiler: FPC trunk (yes, I am risky!), IDE: Lazarus trunk

Abelisto

  • Jr. Member
  • **
  • Posts: 91
Re: create_*_deb.sh
« Reply #1 on: June 10, 2017, 12:53:35 pm »
There are yet another several problems in create_lazarus_deb.sh (seems related to FPC, I trying  Rev: 36473):
"ppcx64 -v | grep version" returns "Binary file (standard input) matches" which affects to
Code: Text  [Select][+][-]
  1. FPCVersion=$($ppcbin -v | grep version | sed 's/.*\([0-9]\+\.[0-9]\+\.[0-9]\+\).*/\1/')
I suppose that it is related to several #00 characters in the output.
After changing it to
Code: Text  [Select][+][-]
  1. FPCVersion=$($ppcbin -iV)
the one problem is solved but I got another one:

fixing permissions ...
creating deb ...
dpkg-deb: warning: conffile '' is not a plain file
dpkg-deb: warning: ignoring 1 warning about the control file(s)
dpkg-deb: building package 'lazarus-project' in '/home/nd/tmp/lazarus-project1.9.0/lazarus-project_build.deb'.


Unfortunately I am not familiar with dpkg-deb so have no any ideas...
OS: Linux Mint + MATE, Compiler: FPC trunk (yes, I am risky!), IDE: Lazarus trunk

 

TinyPortal © 2005-2018