Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thomas Leymonerie
slapos
Commits
0d5ada46
Commit
0d5ada46
authored
Aug 14, 2019
by
Bryton Lacquement
🚪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
component/kumofs: drop the pre configure hook
parent
fa7df772
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
77 deletions
+0
-77
component/kumo/buildout.cfg
component/kumo/buildout.cfg
+0
-1
component/kumo/kumo-hooks.py
component/kumo/kumo-hooks.py
+0
-76
No files found.
component/kumo/buildout.cfg
View file @
0d5ada46
...
...
@@ -14,7 +14,6 @@ recipe = slapos.recipe.cmmi
shared = true
url = https://github.com/downloads/etolabo/kumofs/kumofs-0.4.13.tar.gz
md5sum = 46148e9536222d0ad2ef36777c55714d
pre-configure-hook = ${:_profile_base_location_}/kumo-hooks.py#958a595a02de75624728f8d65e39d800:pre_configure_hook
patches =
${:_profile_base_location_}/kumofs-0.4.13_ipv6support_multiiplistenfix.patch#53af9f1f1375940841c589a6cbe11425
${:_profile_base_location_}/kumofs-0.4.13_fix_gcc-4.9_ftbfs.patch#c09e04c620ce11c3fdd4afc3459cd355
...
...
component/kumo/kumo-hooks.py
deleted
100644 → 0
View file @
fa7df772
import
os
import
sys
import
traceback
from
shutil
import
copy
from
subprocess
import
Popen
,
PIPE
CONFIGURE_PATH
=
os
.
path
.
join
(
'configure'
)
CONFIGURE_BACKUP_PATH
=
CONFIGURE_PATH
+
'_disabled'
# Fake configure, generating a fake Makefile which will create a marker file
# instead of actually installing anything.
# This is needed (?) to fetch --prefix from configure parameters, so we know
# where to tell Makefile to put the dummy file.
FAKE_CONFIGURE
=
'''#!%(python)s -S
import os
import sys
print 'Configuration is disabled on this host because %%s'
print 'Original configure file available at %(backup)s'
prefix = None
next = False
for arg in sys.argv:
if next:
prefix = arg
break
if arg.startswith('--prefix'):
if arg.startswith('--prefix='):
_, prefix = arg.split('=', 1)
break
next = True
if prefix is None:
raise '--prefix parameter not found'
# Generate Makefile with proper prefix
open('Makefile', 'w').write("""all:
\
t
echo 'make disabled, see configure'
install:
\
t
touch %%%%s""" %%%% (
os.path.join(prefix, 'BUILD_DISABLED_BY_BUILDOUT'),
))
sys.exit(0)
'''
%
{
'backup'
:
CONFIGURE_BACKUP_PATH
,
'python'
:
sys
.
executable
,
}
def
pre_configure_hook
(
options
,
buildout
):
gcc_executable
=
os
.
getenv
(
'CC'
,
'gcc'
)
try
:
gcc
=
Popen
([
gcc_executable
,
'-v'
],
stdout
=
PIPE
,
stderr
=
PIPE
,
close_fds
=
True
)
except
OSError
,
(
errno
,
_
):
if
errno
==
2
:
# No gcc installed, nothing to check
pass
else
:
print
'Unexpected failure trying to detect gcc version'
traceback
.
print_exc
()
else
:
gcc
.
wait
()
# Considered innocent until proven guilty.
error
=
None
for
line
in
'
\
n
'
.
join
((
gcc
.
stdout
.
read
(),
gcc
.
stderr
.
read
())).
splitlines
():
if
line
.
startswith
(
'gcc version'
):
if
'4.1.1'
in
line
and
'prerelease'
in
line
:
# There is a bug in 4.1.1 prerelease (ie, as of mandriva
# 2007.0) g++ preventing kumo compilation from succeeding.
error
=
'broken GCC version: %s'
%
(
line
,
)
break
else
:
print
>>
sys
.
stderr
,
'GCC version could not be detected, '
\
'building anyway'
if
error
is
not
None
:
print
'Disabling build, with reason:'
,
error
# Copy to preserver permission
copy
(
CONFIGURE_PATH
,
CONFIGURE_BACKUP_PATH
)
open
(
CONFIGURE_PATH
,
'w'
).
write
(
FAKE_CONFIGURE
%
(
error
,
))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment