AOSC-Archive / autobuild3

AOSC OS package maintenance toolkit (version 3)
https://aosc.io
GNU General Public License v2.0
24 stars 17 forks source link

PM: consider globbing for rpm lists; Leftover for #40. #55

Open Artoria2e5 opened 9 years ago

Artoria2e5 commented 9 years ago

See #40.

MingcongBai commented 9 years ago

It is broken now after https://github.com/AOSC-Dev/autobuild3/commit/7c6cfd1a28a142684676fabb47cbe8d1d31ac721.

RPM build errors:
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(755)
    File must begin with "/": \?\?
    Bad syntax: %attr(777)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(755)
    File must begin with "/": \?\?
    Bad syntax: %attr(755)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
    Bad syntax: %attr(644)
    File must begin with "/": \?\?
MingcongBai commented 9 years ago

A copy of abspec, if that would help.

root [ autobuild3 ] # cat abspec 
# Generated automatically by autobuild on Fri Aug 14 14:03:45 MDT 2015
# This is made to ask rpm to pack from built binary.
Name:           autobuild3
Version:        3.1439604171
Release:        0
Epoch:          0
Summary:        Automatic package building tool.

Group:          Development/Tools
License:        Unknown
URL:            Unknown
Autoreqprov:    yes
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires:       dpkg >= 1.18.2-1, bash >= 4.3.39-1, rpm >= 4.12.0.1-4, apt >= 1.1really1.0.9.10-1, coreutils >= 8.23-1

Obsoletes:              autobuild

%description
Automatic package building tool.

%prep
true

%build
true

%install
rm -rf "$RPM_BUILD_ROOT"
cp -ra --reflink -l /build/autobuild3/abdist "$RPM_BUILD_ROOT"

%clean
rm -rf ""

%pre -p /bin/bash
#!/bin/bash

%preun -p /bin/bash
#!/bin/bash

%post -p /bin/bash
#!/bin/bash

%postun -p /bin/bash
#!/bin/bash

%files
%attr(644,root,root,-)
"\?\?"
%attr(755,root,root,-)
"\?\?"
%attr(777,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(755,root,root,-)
"\?\?"
%attr(755,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
%attr(644,root,root,-)
"\?\?"
Artoria2e5 commented 9 years ago

Debug ver

rpm_transform(){ local p="$1" j badchar=(\\ \" \' \| \* \? . ' '); for j in "${badchar[@]}
"; do echo "$p $j"; p="${p//$j/\\$j}"; done; echo "\"${p//\%/%%}\""; };
rpm_transform 233%

Got:

233% \
233% "
233% '
233% |
233% *
\* ?
\?\? .
\?\?  
\?\?
Artoria2e5 commented 9 years ago
$ rpm_transform_debug /233%
/233% \
/233% "
/233% '
/233% |
/233% *
/233% ?
/233% .
/233%
"/233%%"
MingcongBai commented 9 years ago

Now that the xattr syntax is invalid.

MingcongBai commented 9 years ago

All fixed up. Closing.

Artoria2e5 commented 9 years ago

喂喂,用 * 还没达成一致啊