Instruktaż/Tutorial Gitlab

Silas Mariusz

rm -rf /
Help us, GOD!
5 Kwiecień 2008
10 213
31
2 320
153
39
Nowy Sącz
forum.qnap.net.pl
QNAP
TS-x77
Ethernet
1 GbE
awww.freebsdnews.com_wp_content_uploads_gitlab_0.png
acamo_githubusercontent_com_d3304cf0302931a323d635850928bc506d8e2449e2db9befaa1f9e82b715534070.gif
aabout.gitlab.com_images_4_1_gitlab_line_diff.png


Wymagane:
- Optware

1. Zainstaluj wymagane pakiety
Bash:
ipkg update
ipkg upgrade

ipkg install python27 binutils coreutils git svn git-svn gcc perl patch sudo gawk grep sed make zlib openssl-dev gdbm readline ncurses-dev libxml2 libxslt m4 redis findutils man mc

# Soft-link pkill (required for start/stop gitlab)
ln -sf /opt/bin/pgrep /opt/bin/pkill

Skonfiguruj serwer Redis
Bash:
cp /opt/share/doc/redis/examples/redis.conf /opt/etc/redis.conf

mcedit /opt/etc/redis.conf
# ... lub:
#vi /opt/etc/redis.conf

Zmień ustawienia parametrów damonize i bind:
INI:
damonize yes

bind 127.0.0.1

Uruchom serwer Redis:
Bash:
redis-server /opt/etc/redis.conf

Dodaj Redis serwer do automatycznego startu z systemem, np. z skryptu Optware.
Bash:
mcedit /etc/init.d/Optware.sh
Bash:
  start)

       ...

       [ -x "/opt/bin/redis-server" ] && /opt/bin/redis-server /opt/etc/redis.conf
       ;;
  stop)
        killall redis-server

        /bin/echo "Disable Optware/ipkg"
       ...

Skompiluj biblioteki: libyaml, libicu, libffi, and libatomic_ops
libyaml
Bash:
cd /share/homes/admin
curl http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz | tar xz
cd yaml-0.1.4
./configure --prefix=/opt
make
make install

libatomic_ops
Bash:
cd /share/homes/admin
curl http://www.hpl.hp.com/research/linux/atomic_ops/download/libatomic_ops-1.1.tar.gz | tar xz
cd libatomic_ops-1.1
./configure --prefix=/opt
make
make install

libicu
Bash:
_CFLAGS="${CFLAGS}"
_CXXFLAGS="${CXXFLAGS}"

# UWAGA!
# Poniższe linijki wylacznie dla serwerow QNAP NAS na platformie Intel!
export CFLAGS="-O2 -march=i686"
export CXXFLAGS="-O2 -march=i686"
# Koniec :)

cd /share/homes/admin
curl http://download.icu-project.org/files/icu4c/52.1/icu4c-52_1-src.tgz | tar xz
cd icu/source
./configure --prefix=/opt
make
make install

export CFLAGS="$_CFLAGS" ; export -n _CFLAGS
export CXXFLAGS="$_CXXFLAGS" ; export -n _CXXFLAGS

libffi
Bash:
cd /share/homes/admin
curl ftp://sourceware.org/pub/libffi/libffi-3.0.13.tar.gz | tar xz
cd libffi-3.0.13
./configure --prefix=/opt
make
make install
cp /opt/lib/libffi-3.0.13/include/* /opt/include/

2. Zainstaluj Ruby z App Center lub ręcznie skompiluj:
Bash:
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/lib"

cd /share/homes/admin
curl ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p448.tar.bz2 | tar xj
cd ruby-1.9.3-p448
./configure --prefix=/opt --disable-install-rdoc
make
make install

Następnie...:
Bash:
# Update RubyGems:
gem update --system

# Download default cert.pem
curl -fsSL curl.haxx.se/ca/cacert.pem -o "$(ruby -ropenssl -e 'puts OpenSSL::X509::DEFAULT_CERT_FILE')"

# Install Bundler and Charlock_holmes Gem:
gem install bundler --no-ri --no-rdoc
gem install charlock_holmes --version '0.6.9.4'

Skompiluj: libv8
Bash:
# Libv8 Gem is required to run gitlab. The bundler in gitlab needs Libv8 version , however, that version has ia32 error on TS-212. And recent libv8 also has some configuration problem.

cd /share/homes/admin
git clone git://github.com/cowboyd/libv8.git
cd libv8
bundle install

Modyfikacje:
wyłącz hardfp (UWAGA: Tylko dla starej generacji serwerow NAS na platformie ARM!)
dodaj -fno-strict-aliasing
WYŁĄCZ check_git-svn!
usuń -Wno-unused-local-typedefs

Kod:
diff --git a/ext/libv8/builder.rb b/ext/libv8/builder.rb
index 7407515..e51de3e 100755
--- a/ext/libv8/builder.rb
+++ b/ext/libv8/builder.rb
@@ -18,13 +18,14 @@ module Libv8
       # compilation failures due to warnings about aliasing.
       # http://svnweb.freebsd.org/ports/head/lang/v8/Makefile?view=markup
       flags << "strictaliasing=off" if RUBY_PLATFORM.include?("freebsd") and !check_gcc_compiler(compiler)
+      flags << "strictaliasing=off"

       # Avoid compilation failures on the Raspberry Pi.
       flags << "vfp2=off vfp3=off" if RUBY_PLATFORM.include? "arm"

       # FIXME: Determine when to activate this instead of leaving it on by
       # default.
-      flags << "hardfp=on" if RUBY_PLATFORM.include? "arm"
+      flags << "hardfp=off" if RUBY_PLATFORM.include? "arm"

       # Fix Malformed archive issue caused by GYP creating thin archives by
       # default.
diff --git a/ext/libv8/checkout.rb b/ext/libv8/checkout.rb
index 71a5308..5ac56cd 100644
--- a/ext/libv8/checkout.rb
+++ b/ext/libv8/checkout.rb
@@ -21,7 +21,7 @@ module Libv8

       return unless git?(GYP_Source)

-      check_git_svn!
+      #check_git_svn!

       Dir.chdir(GYP_Source) do
         mkf = File.readlines(File.join(V8_Source, 'Makefile'))
diff --git a/patches/gcc48-wno-unused-local-typedefs.patch b/patches/gcc48-wno-unused-local-typedefs.patch
deleted file mode 100644
index d45276d..0000000
--- a/patches/gcc48-wno-unused-local-typedefs.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-diff --git a/build/common.gypi b/build/common.gypi
-index 3a59639..365178a 100644
---- a/build/common.gypi
-+++ b/build/common.gypi
-@@ -376,7 +376,8 @@
-           }],
-           ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', {
-             'cflags': [ '-Wall', '<(werror)', '-W', '-Wno-unused-parameter',
--                        '-Wnon-virtual-dtor', '-Woverloaded-virtual' ],
-+                        '-Wnon-virtual-dtor', '-Woverloaded-virtual',
-+                        '-Wno-unused-local-typedefs' ],
-           }],
-           ['OS=="linux" and v8_enable_backtrace==1', {
-             # Support for backtrace_symbols.
-diff --git a/build/standalone.gypi b/build/standalone.gypi
-index 125c5bf..32eaf85 100644
---- a/build/standalone.gypi
-+++ b/build/standalone.gypi
-@@ -98,7 +98,8 @@
-       'target_defaults': {
-         'cflags': [ '-Wall', '<(werror)', '-W', '-Wno-unused-parameter',
-                     '-Wnon-virtual-dtor', '-pthread', '-fno-rtti',
--                    '-fno-exceptions', '-pedantic' ],
-+                    '-fno-exceptions', '-pedantic',
-+                    '-Wno-unused-local-typedefs' ],
-         'ldflags': [ '-pthread', ],
-         'conditions': [
-           [ 'OS=="linux"', {

Bash:
curl http://www.commani.net/post/ts-212-gitlab/@data/ts-212-armv5tel.patch | patch -p1

Bash:
#Then, checkout module and compile
bundle exec rake checkout
bundle exec rake compile

# Make gem file
bundle exec rake binary

3. System Users
Bash:
# Create a git user for Gitlab:
adduser -h /share/homes/git -g "Gitlab" -s /bin/bash -D git
passwd -u git

# sudo setting:
echo "admin ALL=(ALL) ALL" > /opt/etc/sudoers.d/admin
chmod 0440 /opt/etc/sudoers.d/admin

4. GitLab shell
Bash:
# Login into git account
sudo -u git -i

Bash:
# Clone gitlab shell
cd /share/homes/git
git clone https://github.com/gitlabhq/gitlab-shell.git
cd gitlab-shell
git checkout v1.7.4
cp config.yml.example config.yml

Edit config: gitlab_url repos_path auth_file redis:bin
INI:
gitlab_url: "http://git.example.com/"

repos_path: "/share/HDA_DATA/homes/git/repositories"

auth_file: "/share/homes/git/.ssh/authorized_keys"

redis:
  bin: /opt/bin/redis-cli
Important! repos_path MUST not contain any symlink!

Do setup
Bash:
./bin/install

5. Database

Use MySQL

Generate random password (this is an option)

$ dd if=/dev/random bs=1 count=4 | sha256sum | head -c 40
Copy the generated password something like this: 6838821069eed7a87cf0d2228e1020d6b14edb47

$ /usr/local/mysql/bin/mysql -u root -p
mysql> CREATE USER 'gitlab'@'localhost' IDENTIFIED by '6838821069eed7a87cf0d2228e1020d6b14edb47';

mysql> CREATE DATABASE IF NOT EXISTS `gitlabhq_production` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;

mysql> GRANT SELECT, LOCK TABLES, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON `gitlabhq_production`.* TO 'gitlab'@'localhost';

mysql> flush privileges;

mysql> \q

6. GitLab

Clone the source

$ cd /share/homes/git

$ git clone gitlabhq/gitlabhq · GitHub gitlab

$ cd gitlab

$ git checkout 6-2-stable
Configure it

$ cp config/gitlab.yml.example config/gitlab.yml

$ vi config/gitlab.yml
Edit config: gitlab:host satellites:path gitlabshell:repospath gitlabshell:hookspath git:bin_path

gitlab:
host: git.example.com

satellites:
path: /share/homes/git/gitlab-satellites/

gitlab_shell:
repos_path: /share/HDA_DATA/homes/git/repositories/
hooks_path: /share/homes/git/gitlab-shell/hooks/

git:
bin_path: /opt/bin/git
Make sure GitLab can write to the log/ and tmp/ directories

$ chown -R git log/ tmp/

$ chmod -R u+rwx log/ tmp/
Create directory for satellites

$ mkdir /share/homes/git/gitlab-satellites
Create directories for sockets/pids and make sure GitLab can write to them

$ mkdir tmp/pids/ tmp/sockets/

$ chmod -R u+rwx tmp/pids/ tmp/sockets/
Create public/uploads directory otherwise backup will fail

$ mkdir public/uploads

$ chmod -R u+rwx public/uploads
Copy the example Unicorn config

$ cp config/unicorn.rb.example config/unicorn.rb

$ vi config/unicorn.rb
Edit config: worker_processes working_directory listen timeout pid stderr_path stdout_path

worker_processes 1

working_directory "/share/homes/git/gitlab" # available in 0.94.0+

listen "/share/homes/git/gitlab/tmp/sockets/gitlab.socket", :backlog => 64
#listen "127.0.0.1:8080", :tcp_nopush => true

timeout 60

pid "/share/homes/git/gitlab/tmp/pids/unicorn.pid"

stderr_path "/share/homes/git/gitlab/log/unicorn.stderr.log"
stdout_path "/share/homes/git/gitlab/log/unicorn.stdout.log"
Confiugre Git global settings for git user, useful when editing via web Edit user.email according to what is set in gitlab.yml

$ git config --global user.name "GitLab"

$ git config --global user.email "gitlab@localhost"

$ git config --global core.autocrlf input
Configure GitLab DB settings

MySQL

$ cp config/database.yml.mysql config/database.yml

$ vi config/database.yml
Edit config: production:password production:socket

production:
password: "6838821069eed7a87cf0d2228e1020d6b14edb47"
socket: /tmp/mysql.sock
Install Gems

Change directory into gitlab:

$ cd /share/homes/git/gitlab
Edit Gemfile.lock:

File Before After
Gemfile.lock libv8 (3.11.8.17) libv8 (3.16.14.3)
therubyracer (0.11.4) therubyracer (0.12.0)
libv8 (~> 3.11.8.12) libv8 (~> 3.16.14.3)
Like this patch:

diff --git a/Gemfile.lock b/Gemfile.lock
index f919e6e..685233c 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -264,7 +264,7 @@ GEM
addressable (~> 2.3)
letter_opener (1.1.1)
launchy (~> 2.2)
- libv8 (3.11.8.17)
+ libv8 (3.16.14.3)
listen (1.2.2)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
@@ -494,8 +494,8 @@ GEM
term-ansicolor (1.2.2)
tins (~> 0.8)
test_after_commit (0.2.1)
- therubyracer (0.11.4)
- libv8 (~> 3.11.8.12)
+ therubyracer (0.12.0)
+ libv8 (~> 3.16.14.3)
ref
thin (1.5.1)
daemons (>= 1.0.9)
Install libv8 manually:

$ gem install -i vendor/bundle/ruby/1.9.1/ /share/homes/admin/libv8/pkg/libv8-3.16.14.3-armv5tel-linux.gem
Install gems:

$ bundle install --deployment --without development test postgres aws
Initialize Database and Activate Advenced Features

$ rake gitlab:setup RAILS_ENV=production
Compile javascript:

$ rake assets:precompile RAILS_ENV=production
Install Init Script

(by admin)

# cd /share/homes/git/gitlab/

# cp lib/support/init.d/gitlab /opt/etc/init.d/S99gitlab

# chmod +x /opt/etc/init.d/S99gitlab
Modify the path: app_root

app_root="/share/homes/git/gitlab"
Omit -i option from sudo:

if [ "$USER" != "$app_user" ]; then
sudo -u "$app_user" -H $0 "$@"; exit;
fi
Register init script into MySettings.sh:

start)

/opt/etc/init.d/S99gitlab start
;;

stop)

/opt/etc/init.d/S99gitlab stop
;;
Check Application Status

Check if GitLab and its environment are configured correctly:

$ cd /share/homes/git/gitlab

$ rake gitlab:env:info RAILS_ENV=production
7. Nginx

Installation

# ipkg install nginx
Create nobody and nogroup

# addgroup nogroup

# adduser -s /bin/false -G nogroup -D -H nobody
Site Configuration

This is my own configuration I use NAS only for GitLab with nginx.

# vi /opt/etc/nginx/nginx.conf
worker_processes 1;

events {
worker_connections 1024;
}


http {
include mime.types;
default_type application/octet-stream;

sendfile on;

keepalive_timeout 65;

upstream gitlab {
server unix:/share/homes/git/gitlab/tmp/sockets/gitlab.socket;
}

server {
listen 80;
server_name git.example.com;

access_log /opt/var/log/gitlab_access.log;
error_log /opt/var/log/gitlab_error.log;

location / {
proxy_read_timeout 300;
proxy_connect_timeout 300;
proxy_redirect off;

proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;

proxy_pass http://gitlab;
}
}
}
Register init script into MySettings.sh:

start)

/opt/etc/init.d/S80nginx start

/opt/bin/redis-server /opt/etc/redis.conf

/opt/etc/init.d/S99gitlab start
;;

stop)

/opt/etc/init.d/S80nginx stop

killall redis-server

/opt/etc/init.d/S99gitlab stop
;;
Restart and check

# /opt/etc/init.d/S80nginx restart

# /opt/etc/init.d/S99gitlab restart

# sudo -u git -i

$ cd /share/homes/git/gitlab

$ rake gitlab:check RAILS_ENV=production

---
source: Gitlab install to QNAP TS-212 | COMMANI.NET
 
Witam.
Próbuje zainstalować ale mam nieoczekiwany błąd podczas kompilacji libyaml

Kod:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /opt/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking build system type... armv5tel-unknown-linux-gnueabi
checking host system type... armv5tel-unknown-linux-gnueabi
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /opt/bin/grep
checking for egrep... /opt/bin/grep -E
checking for fgrep... /opt/bin/grep -F
checking for ld used by gcc... /share/HDA_DATA/.qpkg/Optware/arm-none-linux-gnueabi/bin/ld
checking if the linker (/share/HDA_DATA/.qpkg/Optware/arm-none-linux-gnueabi/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /opt/bin/nm -B
checking the name lister (/opt/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 32768
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /share/HDA_DATA/.qpkg/Optware/arm-none-linux-gnueabi/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /opt/bin/nm -B output from gcc object... ok
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/share/HDA_DATA/.qpkg/Optware/arm-none-linux-gnueabi/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for doxygen... false
checking for ANSI C header files... (cached) yes
checking for stdlib.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
configure: creating ./config.status
config.status: creating yaml-0.1.pc
gawk: ./confihJDzs/subs.awk:2: S["/; s/!.*/"]=am__EXEEXT_FALSE!%!_!# ""
gawk: ./confihJDzs/subs.awk:2:                                 ^ syntax error
gawk: ./confihJDzs/subs.awk:3: S["/; s/!.*/"]=am__EXEEXT_FALSE!%!_!# ""
gawk: ./confihJDzs/subs.awk:3:                                     ^ syntax error
gawk: ./confihJDzs/subs.awk:4: S["/; s/!.*/"]=am__EXEEXT_TRUE!#%!_!# "#"
gawk: ./confihJDzs/subs.awk:4:                                ^ syntax error
gawk: ./confihJDzs/subs.awk:4: S["/; s/!.*/"]=LTLIBOBJS!%!_!# ""
gawk: ./confihJDzs/subs.awk:4:                          ^ syntax error
gawk: ./confihJDzs/subs.awk:5: S["/; s/!.*/"]=LTLIBOBJS!%!_!# ""
gawk: ./confihJDzs/subs.awk:5:                              ^ syntax error
gawk: ./confihJDzs/subs.awk:5: S["/; s/!.*/"]=LIBOBJS!%!_!# ""
gawk: ./confihJDzs/subs.awk:5:                        ^ syntax error
gawk: ./confihJDzs/subs.awk:6: S["/; s/!.*/"]=LIBOBJS!%!_!# ""
gawk: ./confihJDzs/subs.awk:6:                            ^ syntax error
gawk: ./confihJDzs/subs.awk:6: S["/; s/!.*/"]=DOXYGEN_FALSE!%!_!# ""
gawk: ./confihJDzs/subs.awk:6:                              ^ syntax error
gawk: ./confihJDzs/subs.awk:7: S["/; s/!.*/"]=DOXYGEN_FALSE!%!_!# ""
gawk: ./confihJDzs/subs.awk:7:                                  ^ syntax error
gawk: ./confihJDzs/subs.awk:8: S["/; s/!.*/"]=DOXYGEN_TRUE!#%!_!# "#"
gawk: ./confihJDzs/subs.awk:8:                             ^ syntax error
gawk: ./confihJDzs/subs.awk:9: S["/; s/!.*/"]=DOXYGEN!false%!_!# "false"
gawk: ./confihJDzs/subs.awk:9:                                 ^ syntax error
gawk: ./confihJDzs/subs.awk:9: S["/; s/!.*/"]=OTOOL64!%!_!# ""
gawk: ./confihJDzs/subs.awk:9:                        ^ syntax error
gawk: ./confihJDzs/subs.awk:10: S["/; s/!.*/"]=OTOOL64!%!_!# ""
gawk: ./confihJDzs/subs.awk:10:                            ^ syntax error
gawk: ./confihJDzs/subs.awk:10: S["/; s/!.*/"]=OTOOL!%!_!# ""
gawk: ./confihJDzs/subs.awk:10:                      ^ syntax error
gawk: ./confihJDzs/subs.awk:11: S["/; s/!.*/"]=OTOOL!%!_!# ""
gawk: ./confihJDzs/subs.awk:11:                          ^ syntax error
gawk: ./confihJDzs/subs.awk:11: S["/; s/!.*/"]=LIPO!%!_!# ""
gawk: ./confihJDzs/subs.awk:11:                     ^ syntax error
gawk: ./confihJDzs/subs.awk:12: S["/; s/!.*/"]=LIPO!%!_!# ""
gawk: ./confihJDzs/subs.awk:12:                         ^ syntax error
gawk: ./confihJDzs/subs.awk:12: S["/; s/!.*/"]=NMEDIT!%!_!# ""
gawk: ./confihJDzs/subs.awk:12:                       ^ syntax error
gawk: ./confihJDzs/subs.awk:13: S["/; s/!.*/"]=NMEDIT!%!_!# ""
gawk: ./confihJDzs/subs.awk:13:                           ^ syntax error
gawk: ./confihJDzs/subs.awk:13: S["/; s/!.*/"]=DSYMUTIL!%!_!# ""
gawk: ./confihJDzs/subs.awk:13:                         ^ syntax error
gawk: ./confihJDzs/subs.awk:14: S["/; s/!.*/"]=DSYMUTIL!%!_!# ""
gawk: ./confihJDzs/subs.awk:14:                             ^ syntax error
gawk: ./confihJDzs/subs.awk:15: S["/; s/!.*/"]=lt_ECHO!echo%!_!# "echo"
gawk: ./confihJDzs/subs.awk:15:                                ^ syntax error
gawk: ./confihJDzs/subs.awk:16: S["/; s/!.*/"]=RANLIB!ranlib%!_!# "ranlib"
gawk: ./confihJDzs/subs.awk:16:                                 ^ syntax error
gawk: ./confihJDzs/subs.awk:17: S["/; s/!.*/"]=AR!ar%!_!# "ar"
gawk: ./confihJDzs/subs.awk:17:                         ^ syntax error
gawk: ./confihJDzs/subs.awk:18: S["/; s/!.*/"]=OBJDUMP!objdump%!_!# "objdump"
gawk: ./confihJDzs/subs.awk:18:                                   ^ syntax error
gawk: ./confihJDzs/subs.awk:19: S["/; s/!.*/"]=NM!/opt/bin/nm -B%!_!# "/opt/bin/nm -B"
gawk: ./confihJDzs/subs.awk:19:                                     ^ syntax error
gawk: ./confihJDzs/subs.awk:19: S["/; s/!.*/"]=ac_ct_DUMPBIN!%!_!# ""
gawk: ./confihJDzs/subs.awk:19:                              ^ syntax error
gawk: ./confihJDzs/subs.awk:20: S["/; s/!.*/"]=ac_ct_DUMPBIN!%!_!# ""
gawk: ./confihJDzs/subs.awk:20:                                  ^ syntax error
gawk: ./confihJDzs/subs.awk:20: S["/; s/!.*/"]=DUMPBIN!%!_!# ""
gawk: ./confihJDzs/subs.awk:20:                        ^ syntax error
gawk: ./confihJDzs/subs.awk:21: S["/; s/!.*/"]=DUMPBIN!%!_!# ""
gawk: ./confihJDzs/subs.awk:21:                            ^ syntax error
gawk: ./confihJDzs/subs.awk:21: S["/; s/!.*/"]=LD!/share/HDA_DATA/.qpkg/Optware/arm-none-linux-gnueabi/bin/ld%!_!# "/share/HDA_DATA/.qpkg/Optware/arm-none-linux-gnueabi/bin/ld"
gawk: ./confihJDzs/subs.awk:21:                                   ^ syntax error
gawk: ./confihJDzs/subs.awk:22: S["/; s/!.*/"]=LD!/share/HDA_DATA/.qpkg/Optware/arm-none-linux-gnueabi/bin/ld%!_!# "/share/HDA_DATA/.qpkg/Optware/arm-none-linux-gnueabi/bin/ld"
gawk: ./confihJDzs/subs.awk:22:                                                                                  ^ syntax error
gawk: ./confihJDzs/subs.awk:23: S["/; s/!.*/"]=FGREP!/opt/bin/grep -F%!_!# "/opt/bin/grep -F"
gawk: ./confihJDzs/subs.awk:23:                                          ^ syntax error
gawk: ./confihJDzs/subs.awk:24: S["/; s/!.*/"]=EGREP!/opt/bin/grep -E%!_!# "/opt/bin/grep -E"
gawk: ./confihJDzs/subs.awk:24:                                          ^ syntax error
gawk: ./confihJDzs/subs.awk:25: S["/; s/!.*/"]=GREP!/opt/bin/grep%!_!# "/opt/bin/grep"
gawk: ./confihJDzs/subs.awk:25:                                      ^ syntax error
gawk: ./confihJDzs/subs.awk:26: S["/; s/!.*/"]=SED!/bin/sed%!_!# "/bin/sed"
gawk: ./confihJDzs/subs.awk:26:                                ^ syntax error
gawk: ./confihJDzs/subs.awk:27: S["/; s/!.*/"]=host_os!linux-gnueabi%!_!# "linux-gnueabi"
gawk: ./confihJDzs/subs.awk:27:                                         ^ syntax error
gawk: ./confihJDzs/subs.awk:28: S["/; s/!.*/"]=host_vendor!unknown%!_!# "unknown"
gawk: ./confihJDzs/subs.awk:28:                                       ^ syntax error
gawk: ./confihJDzs/subs.awk:29: S["/; s/!.*/"]=host_cpu!armv5tel%!_!# "armv5tel"
gawk: ./confihJDzs/subs.awk:29:                                     ^ syntax error
gawk: ./confihJDzs/subs.awk:30: S["/; s/!.*/"]=host!armv5tel-unknown-linux-gnueabi%!_!# "armv5tel-unknown-linux-gnueabi"
gawk: ./confihJDzs/subs.awk:30:                                                       ^ syntax error
gawk: ./confihJDzs/subs.awk:31: S["/; s/!.*/"]=build_os!linux-gnueabi%!_!# "linux-gnueabi"
gawk: ./confihJDzs/subs.awk:31:                                          ^ syntax error
gawk: ./confihJDzs/subs.awk:32: S["/; s/!.*/"]=build_vendor!unknown%!_!# "unknown"
gawk: ./confihJDzs/subs.awk:32:                                        ^ syntax error
gawk: ./confihJDzs/subs.awk:33: S["/; s/!.*/"]=build_cpu!armv5tel%!_!# "armv5tel"
gawk: ./confihJDzs/subs.awk:33:                                      ^ syntax error
gawk: ./confihJDzs/subs.awk:34: S["/; s/!.*/"]=build!armv5tel-unknown-linux-gnueabi%!_!# "armv5tel-unknown-linux-gnueabi"
gawk: ./confihJDzs/subs.awk:34:                                                        ^ syntax error
gawk: ./confihJDzs/subs.awk:35: S["/; s/!.*/"]=LIBTOOL!$(SHELL) $(top_builddir)/libtool%!_!# "$(SHELL) $(top_builddir)/libtool"
gawk: ./confihJDzs/subs.awk:35:                                                            ^ syntax error
gawk: ./confihJDzs/subs.awk:36: S["/; s/!.*/"]=LN_S!ln -s%!_!# "ln -s"
gawk: ./confihJDzs/subs.awk:36:                              ^ syntax error
gawk: ./confihJDzs/subs.awk:37: S["/; s/!.*/"]=CPP!gcc -E%!_!# "gcc -E"
gawk: ./confihJDzs/subs.awk:37:                              ^ syntax error
gawk: ./confihJDzs/subs.awk:38: S["/; s/!.*/"]=am__fastdepCC_FALSE!#%!_!# "#"
gawk: ./confihJDzs/subs.awk:38:                                    ^ syntax error
gawk: ./confihJDzs/subs.awk:38: S["/; s/!.*/"]=am__fastdepCC_TRUE!%!_!# ""
gawk: ./confihJDzs/subs.awk:38:                                   ^ syntax error
gawk: ./confihJDzs/subs.awk:39: S["/; s/!.*/"]=am__fastdepCC_TRUE!%!_!# ""
gawk: ./confihJDzs/subs.awk:39:                                       ^ syntax error
gawk: ./confihJDzs/subs.awk:39: S["/; s/!.*/"]=CCDEPMODE!depmode=gcc3%!_!# "depmode=gcc3"
gawk: ./confihJDzs/subs.awk:39:                                 ^ syntax error
gawk: ./confihJDzs/subs.awk:40: S["/; s/!.*/"]=CCDEPMODE!depmode=gcc3%!_!# "depmode=gcc3"
gawk: ./confihJDzs/subs.awk:40:                                          ^ syntax error
gawk: ./confihJDzs/subs.awk:40: S["/; s/!.*/"]=AMDEPBACKSLASH!\%!_!# "\\"
gawk: ./confihJDzs/subs.awk:40:                               ^ backslash not last character on line
gawk: ./confihJDzs/subs.awk:40: S["/; s/!.*/"]=AMDEPBACKSLASH!\%!_!# "\\"
gawk: ./confihJDzs/subs.awk:40:                               ^ syntax error
config.status: error: could not create yaml-0.1.pc

Czy może mi ktoś rozwiązać problem
 
Utknąłem przy kompilacji biblioteki libicu a konkretnie na linii 11. curl http://download.icu-project.org/files/icu4c/52.1/icu4c-52_1-src.tgz |tar xz

otrzymuje następujący komunikat :
Kod:
[/share/homes/admin] # curl [URL]http://download.icu-project.org/files/icu4c/52.1/icu4c-52_1-src.tgz[/URL] | tar xz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   354  100   354    0     0    649      0 --:--:-- --:--:-- --:--:--  1011
gzip: Invalid magic
tar: Child returned status 1
tar: Exiting with failure status due to previous errors

sprawdzałem przez przeglądarkę pod adresem Index of /files/icu4c - zbiór jest dostępny
nie pomógł restart serwera, ani próba pobrania wyższej wersji 53.1
wygląda tak jakby gpzip nie rozpoznawał skompresowanego pliku

dostępne w tej lokalizacji zbiory :
adownload.icu_project.org_icons_compressed.gif
icu4c-52_1-AIX7_1-VA.tgz 04-Oct-2013 16:44 13M
adownload.icu_project.org_icons_compressed.gif
icu4c-52_1-HPUX11iv3-aCC.tgz 04-Oct-2013 16:31 15M
adownload.icu_project.org_icons_compressed.gif
icu4c-52_1-RHEL6-i386.tgz 04-Oct-2013 16:15 12M
adownload.icu_project.org_icons_compressed.gif
icu4c-52_1-RHEL6-x64.tgz 04-Oct-2013 15:52 12M
adownload.icu_project.org_icons_compressed.gif
icu4c-52_1-Solaris10-CC.tgz 04-Oct-2013 16:44 13M
adownload.icu_project.org_icons_compressed.gif
icu4c-52_1-Win32-msvc10.zip 04-Oct-2013 14:36 12M
adownload.icu_project.org_icons_compressed.gif
icu4c-52_1-Win64-msvc10.zip 04-Oct-2013 14:31 12M
adownload.icu_project.org_icons_compressed.gif
icu4c-52_1-data.zip 04-Oct-2013 14:16 13M
adownload.icu_project.org_icons_compressed.gif
icu4c-52_1-docs.zip 04-Oct-2013 14:10 6.0M
adownload.icu_project.org_icons_compressed.gif
icu4c-52_1-src.tgz 04-Oct-2013 14:10 23M
adownload.icu_project.org_icons_compressed.gif
icu4c-52_1-src.zip 04-Oct-2013 14:09 24M - ja wybrałem ten
adownload.icu_project.org_icons_unknown.gif
icu4c-bin-52_1.md5 07-Oct-2013 18:18 641
adownload.icu_project.org_icons_unknown.gif
icu4c-src-52_1.md5 07-Oct-2013 18:17 214
Ściągnąłem zbiór z Neta ale przy próbie odpalenia z lokalnego dysku uzyskuje taki komunikat :

Kod:
[/share/homes/admin] # curl /share/Public/Serwis/icu4c-52_1-src.tgz | tar xz    curl: (3) <url> malformed
gzip: Short read
tar: Child returned status 1
tar: Exiting with failure status due to previous errors

Pewnie czegoś zabrakło w składni.
 
nie mogę przejść przez kompilację biblioteki libicu.
Kod:
_CFLAGS="${CFLAGS}"
_CXXFLAGS="${CXXFLAGS}"

# UWAGA!
# Poniższe linijki wylacznie dla serwerow QNAP NAS na platformie Intel!
export CFLAGS="-O2 -march=i686"
export CXXFLAGS="-O2 -march=i686"
# Koniec :)

cd /share/homes/admin
curl http://download.icu-project.org/files/icu4c/52.1/icu4c-52_1-src.tgz | tar xz
cd icu/source
./configure --prefix=/opt
make
make install

export CFLAGS="$_CFLAGS" ; export -n _CFLAGS
export CXXFLAGS="$_CXXFLAGS" ; export -n _CXXFLAGS
wynik zatwierdzenia linii nr. 13 kończy się błędem :
Kod:
[/share/homes/admin/icu/source] # ./configure --prefix=/opt
checking for ICU version numbers... release 52.1, library 52.1, unicode version 6.3
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
...
...
CXXFLAGS=-O2 -march=i686 -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long $(THREADSCXXFLAGS)
configure: creating ./config.status
config.status: creating icudefs.mk
awk: ./confYsue5f/subs.awk:2: Unexpected token
config.status: error: could not create icudefs.mk
próbę wykonałem na bibliotekach icu4c-52_1-src.tgz z dwóch różnych źródeł :
http://download.icu-project.org/files/icu4c/52.1/icu4c-52_1-src.tgz
http://pkgs.fedoraproject.org/repo/pkgs/icu/icu4c-52_1-src.tgz/md5/9e96ed4c1d99c0d14ac03c140f9f346c/
efekt ten sam. Co może być przyczyną tego błędu ? Platforma na której wykonuję instalacje to QNAP TVS-671
Znalazłem rozwiązanie problemu. Brakowało dwóch dodatków - optware-devel i automake.
"You need use ipkg to install optware-devel and automake (some configure scripts require binaries from the autotools toolchain)."
oraz :
Kod:
export PATH=/opt/bin:$PATH
./configure --prefix=/opt
referencje: Can't figure out how to compile - 'configure' command fails - QNAP NAS Community Forum

teraz utknąłem na modyfikacjach libv8. Chodzi o tę część z Code (GNU make) dotyczącą zmian :
dodaj-fno-strict-aliasing
WYŁĄCZcheck_git-svn!
usuń-Wno-unused-local-typedefs
jak to zaimplementować ? z konsoli tego wpisać nie mogę (tam mam tryb "-sh")
być może to trywialne pytanie - nie jestem zaawansowany w Linuxach. prośba o podpowiedź.
już wiem. Kod który sprawia mi tyle problemów rozwiązuje niżej zapisana linia kodu:
curl http://www.commani.net/post/ts-212-gitlab/@data/ts-212-armv5tel.patch |patch-p1
Na dobry trop naprowadziła mnie strona : Gitlab install to QNAP TS-212 | COMMANI.NET

Kolejny problem na jaki natrafiłem przy zatwierdzeniu linii: bundle exec rake compile

uzyskałem :
Kod:
ruby ext/libv8/extconf.rb
creating Makefile
HEAD is now at 2f0efde... Version 3.16.14
Using existing [svn-remote "svn"]
HEAD is now at f7bc250... Make gyp/win32 compatible with upstream ninja.
Compiling v8 for ia32
Using python 2.7.5
Using compiler: /opt/bin/c++ (GCC version 4.2.1)
Unable to find a compiler officially supported by v8.
It is recommended to use GCC v4.4 or higher
Traceback (most recent call last):
  File "build/gyp/gyp", line 15, in <module>
    import gyp
  File "build/gyp/pylib/gyp/__init__.py", line 8, in <module>
    import gyp.input
  File "build/gyp/pylib/gyp/input.py", line 5, in <module>
    from compiler.ast import Const
  File "/root/daily_build/4.2.0/Model/TS-X71/../../SysUtil/Python-2.7.5-cross/install_path_full/lib/python2.7/compiler/__init__.py", line 29, in <module>
  File "/root/daily_build/4.2.0/Model/TS-X71/../../SysUtil/Python-2.7.5-cross/install_path_full/lib/python2.7/compiler/transformer.py", line 29, in <module>
ImportError: No module named parser
make: *** [out/Makefile.ia32] Error 1
GYP_GENERATORS=make \
build/gyp/gyp --generator-output="out" build/all.gyp \
              -Ibuild/standalone.gypi --depth=. \
              -Dv8_target_arch=ia32 \
              -S.ia32  -Dv8_enable_backtrace=1 -Dv8_can_use_vfp2_instructions=true -Darm_fpu=vfpv2 -Dv8_can_use_vfp3_instructions=true -Darm_fpu=vfpv3 -Dwerror='' -Dv8_no_strict_aliasing=1
/share/CACHEDEV1_DATA/homes/admin/libv8/ext/libv8/location.rb:36:in `block in verify_installation!': libv8 did not install properly, expected binary v8 archive '/share/CACHEDEV1_DATA/homes/admin/libv8/vendor/v8/out/ia32.release/obj.target/tools/gyp/libv8_base.a'to exist, but it was not found (Libv8::Location::Vendor::ArchiveNotFound)
        from /share/CACHEDEV1_DATA/homes/admin/libv8/ext/libv8/location.rb:35:in `each'
        from /share/CACHEDEV1_DATA/homes/admin/libv8/ext/libv8/location.rb:35:in `verify_installation!'
        from /share/CACHEDEV1_DATA/homes/admin/libv8/ext/libv8/location.rb:26:in `install!'
        from ext/libv8/extconf.rb:7:in `<main>'
rake aborted!
Command failed with status (1): [ruby ext/libv8/extconf.rb...]
/share/CACHEDEV1_DATA/homes/admin/libv8/Rakefile:25:in `block in <top (required)>'
Tasks: TOP => compile
(See full trace by running task with --trace)

linia która zwróciła moją uwagę, to : It is recommended to use GCC v4.4 or higher
Czy to oznacza, że mam niewłaściwą wersje kompilatora ?
Jeśli tak, to w jaki sposób podnieść jego wersję ?
 
Jestem na etapie komendy bundle install w Skompiluj: libv8.
Kończy się wywołanie błędem
Unfortunately, an unexpected error occurred, and Bundler cannot continue.

Czy przed komendą mam uruchomić plik patch i dopiero wtedy bundle install.
Jeśli mam QNAP Intel wystarczy # linię + flags << "hardfp=off" if RUBY_PLATFORM.include? "arm"

Reszta jak we wzorcu. Dalej pomijam curl ts212-patch... ale muszę go uruchomić. Jak ?
 

Użytkownicy znaleźli tą stronę używając tych słów:

  1. gitlab