Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
metadata-collect-agent
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
nexedi
metadata-collect-agent
Commits
6dfdf64a
Commit
6dfdf64a
authored
Jul 08, 2021
by
Ophélie Gagnard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve install.sh and scanfile-system/cython/Makefile.
Add more automation in overall and in install.sh.
parent
a1e56ef6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
13 deletions
+60
-13
dracut.module/Makefile
dracut.module/Makefile
+1
-1
install.sh
install.sh
+58
-11
scan-filesystem/cython/Makefile
scan-filesystem/cython/Makefile
+1
-1
No files found.
dracut.module/Makefile
View file @
6dfdf64a
...
...
@@ -6,7 +6,7 @@ include collect-sh-template.mk
90metadata-collect/metadata-collect-agent
:
# cd ../ && ./rust-build-static.bash
cd
../scan-filesy
t
tem/cython/
&&
make nopython
&&
cd
../../dracut.module
cd
../scan-filesy
s
tem/cython/
&&
make nopython
&&
cd
../../dracut.module
90metadata-collect/fluent-bit
:
cd
../
&&
./fluent-bit-install.sh
&&
cd
dracut.module
...
...
install.sh
View file @
6dfdf64a
...
...
@@ -2,15 +2,16 @@
set
-eux
apt-get
install
make autopoint autoconf libtool libattr1.dev musl-tools sbsigntool
wget http://ftp.us.debian.org/debian/pool/main/d/dracut/dracut-core_051-1_amd64.deb
wget http://ftp.us.debian.org/debian/pool/main/d/dracut/dracut_051-1_all.deb
wget http://ftp.us.debian.org/debian/pool/main/d/dracut/dracut-network_051-1_all.deb
apt
install
./dracut-core_051-1_amd64.deb ./dracut_051-1_all.deb ./dracut-network_051-1_all.deb
rm
dracut-core_051-1_amd64.deb dracut_051-1_all.deb dracut-network_051-1_all.deb
apt
-y
install
make autopoint autoconf libtool libattr1.dev musl-tools sbsigntool
## Install dracut
if
!
which dracut
;
then
wget http://ftp.us.debian.org/debian/pool/main/d/dracut/dracut-core_051-1_amd64.deb
wget http://ftp.us.debian.org/debian/pool/main/d/dracut/dracut_051-1_all.deb
wget http://ftp.us.debian.org/debian/pool/main/d/dracut/dracut-network_051-1_all.deb
apt
-y
install
./dracut-core_051-1_amd64.deb ./dracut_051-1_all.deb ./dracut-network_051-1_all.deb
rm
dracut
*
.deb
fi
if
[
!
-e
"
$HOME
/.cargo/bin"
]
;
then
curl
--proto
'=https'
--tlsv1
.2
-sSf
https://sh.rustup.rs | sh
...
...
@@ -19,7 +20,6 @@ export PATH=$PATH:$HOME/.cargo/bin
rustup target add x86_64-unknown-linux-musl
if
[
!
-e
/etc/uefi-key
]
;
then
mkdir
/etc/uefi-key
fi
...
...
@@ -30,9 +30,57 @@ if [ ! -e /etc/uefi-key/db.crt ]; then
fi
## Install others
apt
-y
install
libssl-dev
# needed to build fmt library
apt
-y
install
cmake
## Install Go
# needed for dracut.module/ make install
if
!
which go
;
then
GOVERSION
=
1.16.5
wget https://golang.org/dl/go
${
GOVERSION
}
.linux-amd64.tar.gz
rm
-rf
/usr/local/go
tar
-C
/usr/local
-xzf
go
${
GOVERSION
}
.linux-amd64.tar.gz
rm
go
*
.tar.gz
*
# TODO: write in /etc/profile.d/ instead
echo
-e
"
\n
"
>>
/etc/profile
echo
'export PATH=$PATH:/usr/local/go/bin'
>>
/etc/profile
source
/etc/profile
fi
## Install Cython+
# needed for scan-filesystem/ make nopython
# WARNING: it does not differentiate Cython+ from Cython
if
!
which cython3
;
then
mkdir
-p
build_cythonplus
&&
cd
build_cythonplus
wget https://lab.nexedi.com/nexedi/cython/raw/debian/build_cythonplus
chmod
744 build_cythonplus
./build_cythonplus
apt
-y
install
./cython3_
*
cd
..
fi
## Install fmt library
# needed for scan-filesystem/ make nopython
if
!
which
fmt
;
then
git clone https://github.com/fmtlib/fmt.git
cd fmt
&&
mkdir
-p
build_fmt
&&
cd
build_fmt
cmake
-DCMAKE_POSITION_INDEPENDENT_CODE
=
TRUE ..
make
make
install
cd
../..
fi
cd
dracut.module
make
install
apt
-y
autoremove
## Build UEFI application
# TODO: write a separate script: one to install stuff, the other to build the UEFI application
cd
..
rm
-rf
dracut_tmp
mkdir
dracut_tmp
...
...
@@ -42,7 +90,6 @@ disk_info=$(/sbin/fdisk -l | grep '^/dev' | cut -d' ' -f1)
disk_info_list
=(
${
disk_info
//
' '
/
}
)
/sbin/e2label
${
disk_info_list
[1]
}
ROOT
rm
-rf
/boot/efi/EFI/Linux/
*
...
...
scan-filesystem/cython/Makefile
View file @
6dfdf64a
...
...
@@ -51,7 +51,7 @@ nopython: main.cpp#$(EXE)
-
g++
-O2
-g
-Wno-unused-result
-Wsign-compare
-pthread
-I
/usr/include/python3.7 main.cpp
-lcrypto
-lfmt
-o
main 2> logs/link_errors
./parse_link_errors.py < logs/link_errors
make fake_python.o
g++
-O2
-g
-Wno-unused-result
-Wsign-compare
-pthread
-I
/usr/include/python3.7 main.cpp fake_python.o
-lcrypto
-lfmt
-o
main
g++
-O2
-g
-Wno-unused-result
-Wsign-compare
-pthread
-I
/usr/include/python3.7 main.cpp fake_python.o
-lcrypto
-lfmt
-o
../../metadata-collect-agent
%.cpp
:
%.pyx
@
echo
"[Cython Compiling
$^
->
$@
]"
...
...
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