Be sure to add yourself to that group.
-e2factory, for historical reasons, builds and installs its own lua.
-Make sure you download the lua-5.1.3.tar.gz package and place it in
-the top level of the e2factory source tree prior to building. That
+e2factory, for historical reasons, builds and installs its own lua.
+Make sure you download the lua-5.1.3.tar.gz package and place it in
+the top level of the e2factory source tree prior to building. That
can be done by creating a symlink.
ln -s ../lua-5.1.3.tar.gz
# Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
# Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
# Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-#
+#
# For more information have a look at http://www.e2factory.org
#
# e2factory is a registered trademark by emlix GmbH.
#
# This file is part of e2factory, the emlix embedded build system.
-#
+#
# e2factory is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
done
install -m 644 Changelog $(DOCDIR)/
-clean:
+clean:
for s in $(SUBDIRS) ; do \
$(MAKE) -C $$s $@ ;\
done
e2factory has extension support now.
-e2factory extensions are simply additional code that is installed in
+e2factory extensions are simply additional code that is installed in
addition to the e2factory core.
extensions can provide a local and a global part. The requirements are
- * a git repository, located next to the e2factory core one, if the
+ * a git repository, located next to the e2factory core one, if the
extension should be automatically installed with the local tools
* the extensions' Makefile must provide the targets local and install-local
to do local install (via e2-install-e2)
# Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
# Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
# Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-#
+#
# For more information have a look at http://www.e2factory.org
#
# e2factory is a registered trademark by emlix GmbH.
#
# This file is part of e2factory, the emlix embedded build system.
-#
+#
# e2factory is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
$(MAKE) -C $$s $@ ;\
done
-clean:
+clean:
for s in $(SUBDIRS) ; do \
$(MAKE) -C $$s $@ ;\
done
2.5 all
read the following from stdin
chroot path c
- build path T
+ build path T
build path in chroot Tc
result name r
and run all steps required to build without using a chroot environment
read a result name from stdin
print the following to stdout for use as input to most build tools
chroot path c
- build path T
+ build path T
build path in chroot Tc
result name r
the absolute path to the projects' bin/ directory
5.3 e2
-e2 is the main script that calls all local tools. e2 refuses to call a
+e2 is the main script that calls all local tools. e2 refuses to call a
local tool if the cwd is not inside a project directory.
Local tools are called from ./bin in the project root unless the
E2_LOCAL_TOOL_PATH environment variable is set.
-6. Bootstrap process to check out a project and the corresponding
+6. Bootstrap process to check out a project and the corresponding
version of the e2 tool
6.1 steps
$ make install-local-symlinks LOCALBINDIR=$PWD/devel
use the development tools while testing
$ export E2_LOCAL_TOOL_PATH=$PWD/devel
- It is possible to edit the local tools in the working copy and immediately
+ It is possible to edit the local tools in the working copy and immediately
use them in any project without performing additional steps ('make install').
# Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
# Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
# Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-#
+#
# For more information have a look at http://www.e2factory.org
#
# e2factory is a registered trademark by emlix GmbH.
#
# This file is part of e2factory, the emlix embedded build system.
-#
+#
# e2factory is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
# Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
# Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-#
+#
# For more information have a look at http://www.e2factory.org
#
# e2factory is a registered trademark by emlix GmbH.
#
# This file is part of e2factory, the emlix embedded build system.
-#
+#
# e2factory is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
clean:
rm -f $(CLEAN_FILES)
rm -fr html man
-
+
%.html: %
man2html -r $< >$@
build-id is stored in the local project-file "proj/build-numbers".
The build-number can be manually increased or synchronized with
a central server. Build-numbers always strictly increase with each
-change. After synchronization, an environment file with suitable
+change. After synchronization, an environment file with suitable
variable definitions is generated in "proj/build-numbers.env". This
file can be included in "proj/env" with the following command:
.BR \-\-no\-sync
Do not synchronize with the server, just update local build-number file.
.TP
-.BR
+.BR
.BR \-\-prefix=PREFIX
Add a user-defined prefix before the local build-numbers.
.TP
Show usage information.
.P
-Valid build modes according to the builtin policy are
+Valid build modes according to the builtin policy are
\fBworking-copy\fR, \fBtag\fR, \fBrelease\fR and \fBbranch\fR.
\fBtag\fR is the default build mode. \fBrelease\fR is exactly the same
as \fBtag\fR but the results will be stored in a special location on the
<server> defaults to 'projects'.
The project name will be the basename of <location>.
The usual project location convention is
-\fBprojects:<customer>/<projectname>\fR.
+\fBprojects:<customer>/<projectname>\fR.
.SH RETURN VALUE
Normally, exit status is 0. On error, it is non-zero.
.SH DESCRIPTION
\fBe2-fetch-sources\fR retrieves sources for project results. Sources can be
either specified through the source- or result names. For sources stored
-in version-controlled repositories, the associated repositories will be
+in version-controlled repositories, the associated repositories will be
cloned and a project-local working copy created.
Note, that sources of type \fIfiles\fR are not fetched.
e2-install-e2
.SH DESCRIPTION
-\fBe2-install-e2\fR reads the required e2 version from the
+\fBe2-install-e2\fR reads the required e2 version from the
\fB.e2/e2version\fR file and installs that version of e2 into the local
project environment.
By default the tagged version of e2 is installed.
To enable the project developers to follow a stable branch of the
-e2 local tools, the tag may be ^ unless a release shall be built.
+e2 local tools, the tag may be ^ unless a release shall be built.
In this case the HEAD of the branch is installed. In this case
the e2 local tools change if commits are done to that branch.
When creating a git repository a server side repository is created and
a local repository is created and set up to be related to the server side
repository via the remote named origin.
-No commits are initially created. The user must create the initial commit
+No commits are initially created. The user must create the initial commit
and push it to the server. See Examples below.
-e2-new-source(1) does not create any configuration files. Use e2-cf(1) to
+e2-new-source(1) does not create any configuration files. Use e2-cf(1) to
create a source configuration.
.SH RETURN VALUE
.SH EXAMPLES
To place an external source file on the default server:
.IP
-e2-new-source --files a/anything/0.1 file:///tmp/download/anything-0.1.tar.bz2
+e2-new-source --files a/anything/0.1 file:///tmp/download/anything-0.1.tar.bz2
file:///tmp/download/anything-0.1.tar.bz2.sha1
.PP
To create a new, empty git repository on server and client side:
| | |-- build-script build instructions executed in chroot
| | o-- <local file> project-local files (related to result)
|-- <subfolder> results can be grouped in subfolders
-| | o-- <result>
-| | | |-- config
-| | | |-- build-script
-| | | o-- <local file>
+| | o-- <result>
+| | | |-- config
+| | | |-- build-script
+| | | o-- <local file>
| :
| :
|
| |-- config source configuration
| o-- <local file> project-local files (related to source)
|-- <subfolder> sources can be groupd in subfolders
- | o-- <source>
- | | |-- config
- | | o-- <local file>
+ | o-- <source>
+ | | |-- config
+ | | o-- <local file>
| :
:
.fi
<variable1> = "<value1>",
<variable2> = "<value2>",
:
-}
+}
.fi
During execution of a build script for a given result, environment variables
location = "<path-to-file>",
<destiny> = "contents"
}
-}
+}
.fi
<destiny> is one of \fBunpack\fR, \fBpatch\fR or \fBcopy\fR.
}
.fi
-If the source refers to a version control repository
+If the source refers to a version control repository
(\fBgit(7)\fR, \fBsvn(1)\fR, etc.), then
these properties should be defined:
.fi
To use cvs pserver mode the server must use "cvspserver://" transport.
-cvs login is not supported. Do cvs login before trying to access the
+cvs login is not supported. Do cvs login before trying to access the
cvs server with e2.
Source configuration files must follow \fBlua(1)\fR syntax.
.SH RESULT\ CONFIGURATION
-"config" files for results look similar to source configurations, but
+"config" files for results look similar to source configurations, but
use the "e2result" configuration command:
.nf
e2result {
- <propertyname> = <value>,
+ <propertyname> = <value>,
...
}
.fi
This interface is versioned using files named \fBversion\fR in the
project directory on the server, and \fB.e2/version\fR in the project
repository.
-These files store integer version ids. They state which version of
+These files store integer version ids. They state which version of
global code may be used to perform certain tasks on a project.
.nf
-The interfaces cover:
+The interfaces cover:
* how to create a project
* how to checkout a project from the server
* how to install the local e2 tools into a project
.TP
.BR e2-dlist
Shows a sorted list of the dependencies for a given result.
-.TP
+.TP
.BR e2-dsort
Shows the sorted list of results in the order in which they must be built
to satisfy interdependencies among each result.
can be \fBtrue\fR or \fBfalse\fR for flags or a quoted string for options
that take an argument.
Omitting the value is equivalent to specifying \fBtrue\fR.
-Options given on the command line override options specified in
+Options given on the command line override options specified in
\fBe2rc\fR.
Example:
# Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
# Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
# Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-#
+#
# For more information have a look at http://www.e2factory.org
#
# e2factory is a registered trademark by emlix GmbH.
#
# This file is part of e2factory, the emlix embedded build system.
-#
+#
# e2factory is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-SUBDIRS =
+SUBDIRS =
TOPLEVEL = ../..
include $(TOPLEVEL)/make.vars
cat header.html >$@
markdown $< >>$@
cat footer.html >>$@
-
+
manual.tar.gz: $(HTML)
make DOCDIR=./tmp install-doc
cp tmp/manual/manual.html tmp/manual/index.html
Building embedded systems from source usually means taking a lot of steps,
building different parts of the system, starting with a toolchain, going
-on building the root filesystem and finally creating a flash image, for
+on building the root filesystem and finally creating a flash image, for
example. You may even want to build an up-to-date set of documentation
with the final result.
make up the toolchain while the root filesystem could consist of some
libraries, e.g. zlib and the busybox.
-Zlib and busybox are usually results again, but they are built from
+Zlib and busybox are usually results again, but they are built from
sources (that may or may not be named like the results in those cases).
Thats basically the whole concept: Configure sources and configure
-------
-A buildid is calculated for each result that is built. The buildid,
+A buildid is calculated for each result that is built. The buildid,
technically being a sha1 hash, identifies all configuration values
-that influence the build process. That key is used to store the
+that influence the build process. That key is used to store the
result.
That means, if the user requests building a result, *e2factory* may
check if the result already exists and simply skip building it if
it does. This feature offers the unique combination of being sure to
-build exactly all results that are influenced by changes done to the
+build exactly all results that are influenced by changes done to the
project configuration or sources.
That makes the workflow as easy as just doing changes and requesting
as in the build processes.
Variables can be published across the whole project or local to a set of
-results. In the first case the variables are available in the whole
+results. In the first case the variables are available in the whole
configuration and in all build processes. They influence all buildids.
Publishing variables to a specific set of results will make the variables
The table must hold keys with string values assigned. These key-value
pairs are usable in that results configuration and build process.
-Calling the env function with a string argument takes that string as a
-env file to load in addition to the current configuration file. The
+Calling the env function with a string argument takes that string as a
+env file to load in addition to the current configuration file. The
filename is relative to the project root.
Examples:
configurations later on.
To configure licences call the e2licence function with a table argument.
-The table must specify keys with table values. The keys are used as
+The table must specify keys with table values. The keys are used as
the licence identifier, that can be referenced in source configurations.
The table assigns files to the licence:
*e2factory* needs some configuration information to run, that is collected in the
project configuration.
-To setup the project configuration call the e2project function with a
+To setup the project configuration call the e2project function with a
table argument.
The table must specify the following keys:
Prepare building a release with *e2factory*:
* for each scm source:
- * make sure the source is tagged and the tag is configured in the
+ * make sure the source is tagged and the tag is configured in the
source configuration
* change the release_id attribute in proj/config to the release string
* commit the file
To create a result in the configuration call the e2result function
-with a table argument. Usually a source configures one or more of the
+with a table argument. Usually a source configures one or more of the
following keys:
* sources list of sources
The `collect_project` flag provides a tree holding everything to rebuild
the result configured in `collect_project_default_result` in $E2_TMPDIR/project.
-The user must write a build-script to package that tree to a file in
+The user must write a build-script to package that tree to a file in
$E2_TMPDIR/out
-All configuration options can be combined. And even a configuration with
-no keys is valid: The `base` chroot group is used automatically, and the
+All configuration options can be combined. And even a configuration with
+no keys is valid: The `base` chroot group is used automatically, and the
`build-script` runs and may create a result.
Example configuration:
collect_project_default_result = "bsp",
sources = { },
depends = { },
-
}
Example build script:
* location (old: name) string: file location
* unpack string: the directory included in the source package
* patch string: strip n directories when
- * copy string: the directory to copy the file into, relative to
+ * copy string: the directory to copy the file into, relative to
Example:
sha1 = "60faeaaf250642db5c0ea36cd6dcc9f99c8f3902",
},
}
- }
+ }
cvs source (type = cvs)
# Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
# Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
# Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-#
+#
# For more information have a look at http://www.e2factory.org
#
# e2factory is a registered trademark by emlix GmbH.
#
# This file is part of e2factory, the emlix embedded build system.
-#
+#
# e2factory is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# installing software for packaging
# ./env files containing environment variables are located here
# ./init init scripts are located here
-# ./script this directory holds the build driver and the build
+# ./script this directory holds the build driver and the build
# script
# ./in This directory is available but unused
# ./dep/<dependency> These directories hold result files from dependency
# installing software for packaging
# ./env files containing environment variables are located here
# ./init init scripts are located here
-# ./script this directory holds the build driver and the build
+# ./script this directory holds the build driver and the build
# script
# ./in This directory is available but unused
# ./dep/<dependency> These directories hold result files from dependency
e2source {
-- the source name
- -- (is derived from the config file path if only one source is
+ -- (is derived from the config file path if only one source is
-- specified per file)
name = "helloworld",
-- the source type
# Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
# Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
# Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-#
+#
# For more information have a look at http://www.e2factory.org
#
# e2factory is a registered trademark by emlix GmbH.
#
# This file is part of e2factory, the emlix embedded build system.
-#
+#
# e2factory is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
@for s in $(SUBDIRS) ; do $(MAKE) -C $$s $@ ; done
rm -f $(CLEAN_FILES)
-.PHONY: all install local install-local doc install-doc clean
+.PHONY: all install local install-local doc install-doc clean
# Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
# Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
# Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-#
+#
# For more information have a look at http://www.e2factory.org
#
# e2factory is a registered trademark by emlix GmbH.
#
# This file is part of e2factory, the emlix embedded build system.
-#
+#
# e2factory is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-
+
For more information have a look at http://www.e2factory.org
e2factory is a registered trademark by emlix GmbH.
This file is part of e2factory, the emlix embedded build system.
-
+
e2factory is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
]]
c.ce = {}
e2lib.log(4, "Cache: " .. c.name)
e2lib.log(4, " url: " .. c.url)
- if debug then
+ if debug then
for k,v in pairs(c) do
print(k,v)
end
-- @return bool
-- @return an error object on failure
function fetch_file(cache, server, location, destdir, destname, flags)
- e2lib.log(4, string.format("%s: %s, %s, %s, %s, %s", "fetch_file()",
- tostring(server), tostring(location), tostring(destdir),
+ e2lib.log(4, string.format("%s: %s, %s, %s, %s, %s", "fetch_file()",
+ tostring(server), tostring(location), tostring(destdir),
tostring(destname), tostring(flags)))
local rc, re
local e = new_error("cache: fetching file failed")
function push_file(cache, sourcefile, server, location, flags)
local rc, re
local e = new_error("error pushing file to cache/server")
- e2lib.log(4, string.format("%s: %s, %s, %s", "push_file()",
+ e2lib.log(4, string.format("%s: %s, %s, %s", "push_file()",
sourcefile, server, location))
local ce, re = ce_by_server(cache, server)
if not ce then
-- @return bool
-- @return an error object on failure
function writeback(cache, server, location, flags)
- e2lib.log(4, string.format("writeback(): %s %s %s", cache.name,
+ e2lib.log(4, string.format("writeback(): %s %s %s", cache.name,
server, location))
local e = new_error("writeback failed")
local rc, re
-- @return an error object on failure
function cache_file(cache, server, location, flags)
e2lib.log(4, string.format("cache_file(): %s %s %s %s",
- tostring(cache), tostring(server), tostring(location),
+ tostring(cache), tostring(server), tostring(location),
tostring(flags)))
local e = new_error("caching file failed: %s:%s", server, location)
local rc, re
-- file is in the cache and no refresh requested
return true, nil
end
- local destdir = string.format("/%s/%s", ceurl.path,
+ local destdir = string.format("/%s/%s", ceurl.path,
e2lib.dirname(location))
-- fetch the file to the cache
rc, re = transport.fetch_file(ce.remote_url, location, destdir, nil)
-- @return string the path to the cached file, nil on error
-- @return an error object on failure
function file_path(cache, server, location, flags)
- e2lib.log(4, string.format("file_path(): %s %s %s",
+ e2lib.log(4, string.format("file_path(): %s %s %s",
cache.name, server, location))
local rc, re
local e = new_error("providing file path failed")
Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-
+
For more information have a look at http://www.e2factory.org
e2factory is a registered trademark by emlix GmbH.
This file is part of e2factory, the emlix embedded build system.
-
+
e2factory is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
]]
-- Table operations
--
-- table.reverse(TABLE) -> TABLE'
---
+--
-- Reverse array elements and return new table.
--
-- table.map(TABLE, FUNCTION) -> TABLE'
local t2 = {}
local i = 1
for k, x in pairs(t) do
- if f(x) then
- t2[ i ] = x
+ if f(x) then
+ t2[ i ] = x
i = i + 1
end
end
Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-
+
For more information have a look at http://www.e2factory.org
e2factory is a registered trademark by emlix GmbH.
This file is part of e2factory, the emlix embedded build system.
-
+
e2factory is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
*
* This layout is broken: the chroot marker file can be deleted in chroot
* and early when removing chroot is not fully done.
- * In that case e2factory refuses to use and even delete the chroot
+ * In that case e2factory refuses to use and even delete the chroot
* environment, leaving the user with a chroot environment that only
* root may delete.
*
Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-
+
For more information have a look at http://www.e2factory.org
e2factory is a registered trademark by emlix GmbH.
This file is part of e2factory, the emlix embedded build system.
-
+
e2factory is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
]]
require("cache")
require("luafile")
-_version = "e2factory, the emlix embedded build system, version " ..
+_version = "e2factory, the emlix embedded build system, version " ..
buildconfig.VERSION
_licence = [[
{ "v4", false } -- tooldebug
},
log_debug = false,
- debug = false,
+ debug = false,
playground = false,
interactive = arg and (arg[ -1 ] == "-i"),
-- variables initialized in init()
- username = nil,
- homedir = nil,
+ username = nil,
+ homedir = nil,
hostname = nil,
termwidth = 72,
env = {},
return nil
end
---- exit, cleaning up temporary files and directories.
+--- exit, cleaning up temporary files and directories.
-- Return code is '1' and cannot be overrided.
-- This function takes any number of strings or an error object as arguments.
-- Please pass error objects to this function in the future.
local function nextline(s)
while true do
local ln = s:read("*l")
- if not ln then
+ if not ln then
s:close()
return nil
elseif not string.find(ln, "^%s*#") and string.find(ln, "%S") then
-- compute_hash(ITER, [VALUE...])
function compute_hash(iter, ...)
- local n, f, s
+ local n, f, s
local i, o, e, p = e2util.pipe("sha1sum")
if not i then bomb("cannot calculate hash sum: " .. o) end
for x in iter(...) do
if not n then bomb(f) end
n, f = e2util.wait(p)
if not n then bomb(f) end
- return s
+ return s
end
-- Iterator functions
return (rc/256)
end
--- callcmd_redirect: call a command with
--- stdin redirected from /dev/null
+-- callcmd_redirect: call a command with
+-- stdin redirected from /dev/null
-- stdout/stderr redirected to a luafile object
function callcmd_redirect(cmd, out)
.. table.concat(rcs, ", ")
end
---- call a command with stdin redirected from /dev/null, stdout/stderr
+--- call a command with stdin redirected from /dev/null, stdout/stderr
-- captured via a pipe
-- the capture function is called for every chunk of output that
-- is captured from the pipe.
local args = string.format("-d '%s'", dir)
return call_tool("test", args)
end
-
+
--- check if path is a file
-- @param dir string: path
-- @return bool
Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-
+
For more information have a look at http://www.e2factory.org
e2factory is a registered trademark by emlix GmbH.
This file is part of e2factory, the emlix embedded build system.
-
+
e2factory is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
]]
-- option(NAME, [DOC, [DEFAULT, [FUNCTION, [ARGUMENTNAME]]]])
--
-- Declares an option with argument. DEFAULT defaults to "true".
--- ARGUMENTNAME will be used in the generated usage information
+-- ARGUMENTNAME will be used in the generated usage information
-- (see "usage()").
--
-- alias(NAME, OPTION)
return false, new_error("option exists: %s", name)
end
options[ name ] = {type = "option", documentation = doc or "", name = name,
- proc=func, default=default or true,
+ proc=func, default=default or true,
argumentname=argname or "ARGUMENT"}
table.insert(optionlist, name)
end
return
end
local e2rc = {}
- local rc, e = e2lib.dofile_protected(file,
+ local rc, e = e2lib.dofile_protected(file,
{ e2rc = function(t) e2rc = t end })
if not rc then
e2lib.abort(e)
local vals = {}
local opts={ arguments=vals }
local i = 1
- while i <= #args do -- we may modify args
+ while i <= #args do -- we may modify args
local v = args[ i ]
local s, e, opt, val = string.find(v, "^%-%-?([^= ]+)=(.*)$")
if s then
opt = aliases[ opt ] or opt
- if options[ opt ] then
+ if options[ opt ] then
local proc = options[ opt ].proc
if proc then val = proc(val) end
opts[ opt ] = val
else usage(1)
end
- else
+ else
s, e, opt = string.find(v, "^%-%-?(.*)$")
if s then
opt = aliases[ opt ] or opt
if i == #args then
e2lib.abort("argument missing for option: " .. opt)
end
- if proc then
+ if proc then
opts[ opt ] = proc(args[ i + 1 ])
- else
+ else
opts[ opt ] = args[ i + 1 ]
end
i = i + 1
else
- if proc then
+ if proc then
opts[ opt ] = proc()
- else
+ else
opts[ opt ] = options[ opt ].default
end
end
Copyright (C) 2007-2009 by Gordon Hecker and Oskar Schirmer, emlix GmbH
Copyright (C) 2007-2008 by Felix Winkelmann, emlix GmbH
-This program comes with ABSOLUTELY NO WARRANTY; This is free software,
-and you are welcome to redistribute it under certain conditions.
+This program comes with ABSOLUTELY NO WARRANTY; This is free software,
+and you are welcome to redistribute it under certain conditions.
Type e2 --licence for more information.
]])
print(documentation)
Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-
+
For more information have a look at http://www.e2factory.org
e2factory is a registered trademark by emlix GmbH.
This file is part of e2factory, the emlix embedded build system.
-
+
e2factory is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
static char buffer[ PATH_MAX + 1 ];
-/* e2util.fork() -> pid
+/* e2util.fork() -> pid
| nil, ERRORMESSAGE
Forks a subprocess.
}
-/* e2util.cwd() -> STRING
-
+/* e2util.cwd() -> STRING
+
Returns the current working directory.
*/
}
-/* e2util.realpath(PATH) -> PATH' | nil
-
+/* e2util.realpath(PATH) -> PATH' | nil
+
If PATH names an existing object in the file-system, then this
function will return the absolute, canonical representation of PATH,
otherwise nil is returned.
}
-/* e2util.stat(PATH, [FOLLOWLINKS?]) -> TABLE | nil
-
+/* e2util.stat(PATH, [FOLLOWLINKS?]) -> TABLE | nil
+
Returns stat(3) information for the file system object designated by PATH.
If FOLLOWLINKS? is not given or false, then the returned information will
apply to the actual symbolic link, if PATH designates one. Otherwise
blocks number of blocks (number)
type one of the following strings:
-
+
block-special
character-special
fifo-special
}
-/* e2util.readlink(PATH) -> PATH' | nil
+/* e2util.readlink(PATH) -> PATH' | nil
Returns the path pointed to by the symbolic link PATH or nil, if the
link does not exist.
int len;
len = readlink(p, buffer, sizeof(buffer));
-
+
if(len > -1) lua_pushlstring(lua, buffer, len);
else lua_pushnil(lua);
}
-/* e2util.directory(PATH, [DOTFILES?]) -> TABLE | nil
+/* e2util.directory(PATH, [DOTFILES?]) -> TABLE | nil
Returns an array with the contents of the directory designated by PATH.
If DOTFILES? is given and true then files beginning with "." are also
lua_newtable(lua);
for(;;) {
- de = readdir(dir);
+ de = readdir(dir);
if(de == NULL) break;
closedir(dir);
}
-
+
return 1;
}
-/* e2util.tempnam(DIR) -> PATH
+/* e2util.tempnam(DIR) -> PATH
Returns a random temporary pathname.
*/
}
-/* e2util.exists(PATH, [EXECUTABLE?]) -> BOOL
+/* e2util.exists(PATH, [EXECUTABLE?]) -> BOOL
Returns true if the file given in PATH exists. If EXECUTABLE? is given
and true, then it is also checked whether the file is executable.
}
-/* e2util.cd(PATH)
+/* e2util.cd(PATH)
Changes the current working directory to PATH.
*/
return 2;
}
-/* e2util.symlink(OLDPATH, NEWPATH)
+/* e2util.symlink(OLDPATH, NEWPATH)
Creates a symbolic link named NEWPATH which contains the string OLDPATH.
*/
}
else if(child == 0) {
close(in[ 1 ]);
-
+
if(in[ 0 ] != STDIN_FILENO) {
dup2(in[ 0 ], STDIN_FILENO);
close(in[ 0 ]);
}
close(out[ 0 ]);
-
+
if(out[ 1 ] != STDOUT_FILENO) {
dup2(out[ 1 ], STDOUT_FILENO);
close(out[ 1 ]);
}
close(err[ 0 ]);
-
+
if(err[ 1 ] != STDERR_FILENO) {
dup2(err[ 1 ], STDERR_FILENO);
close(err[ 1 ]);
/* e2util.wait(PID) -> STATUS, PID
| nil, ERRORMESSAGE
- waits for process to terminate and returns exit code.
+ waits for process to terminate and returns exit code.
*/
-static int
+static int
process_wait(lua_State *lua)
{
pid_t pid = luaL_checkinteger(lua, 1);
int m;
if(buf == NULL) return 0;
-
+
m = read(fd, buf, n);
if(m < 0) {
close_fd(lua_State *lua)
{
int fd = luaL_checkinteger(lua, 1);
-
+
if(close(fd) < 0) {
lua_pushnil(lua);
lua_pushstring(lua, (char *)strerror(errno));
Establish signal handler for SIGINT that aborts. */
-static void
+static void
lstop(lua_State *L, lua_Debug *ar) {
lua_sethook(L, NULL, 0, 0);
lua_getglobal(L, "e2lib");
static lua_State *globalL;
-static void
+static void
laction (int i) {
signal(i, SIG_DFL); /* if another SIGINT happens before lstop,
terminate process (default action) */
{
luaL_register(lua, "e2util", lib);
globalL = lua;
- signal(SIGINT, laction);
+ signal(SIGINT, laction);
return 1;
}
Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-
+
For more information have a look at http://www.e2factory.org
e2factory is a registered trademark by emlix GmbH.
This file is part of e2factory, the emlix embedded build system.
-
+
e2factory is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
]]
Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-
+
For more information have a look at http://www.e2factory.org
e2factory is a registered trademark by emlix GmbH.
This file is part of e2factory, the emlix embedded build system.
-
+
e2factory is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
]]
Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-
+
For more information have a look at http://www.e2factory.org
e2factory is a registered trademark by emlix GmbH.
This file is part of e2factory, the emlix embedded build system.
-
+
e2factory is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/*
+/*
Low-level file-system and process operations.
*/
#include <lualib.h>
#include <lauxlib.h>
-static int
+static int
lua_fopen(lua_State *lua)
{
FILE *f;
return 1;
}
-static int
+static int
lua_fdopen(lua_State *lua)
{
FILE *f;
if(!f) {
lua_pushboolean(lua, 0);
return 1;
- }
+ }
setlinebuf(f);
lua_pushboolean(lua, 1);
return 1;
Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-
+
For more information have a look at http://www.e2factory.org
e2factory is a registered trademark by emlix GmbH.
This file is part of e2factory, the emlix embedded build system.
-
+
e2factory is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
]]
end
rawset(t, n, v)
end
-
+
mt.__index = function (t, n)
if not mt.__declared[n] and what() ~= "C" then
error("variable '"..n.."' is not declared", 2)
Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-
+
For more information have a look at http://www.e2factory.org
e2factory is a registered trademark by emlix GmbH.
This file is part of e2factory, the emlix embedded build system.
-
+
e2factory is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
]]
-- @return true on success, false on error
-- @return an error object on failure
function fetch_file(surl, location, destdir, destname)
- e2lib.log(4, string.format("%s: %s %s %s", "fetch_file()", surl,
+ e2lib.log(4, string.format("%s: %s %s %s", "fetch_file()", surl,
location, destdir))
if not destname then
destname = e2lib.basename(location)
-- @return true on success, false on error
-- @return nil, an error string on error
function file_path(surl, location)
- e2lib.log(4, string.format("%s: %s %s", "file_path()", surl,
+ e2lib.log(4, string.format("%s: %s %s", "file_path()", surl,
location))
local e = new_error("can't get path to file")
local u, re = url.parse(surl)
Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-
+
For more information have a look at http://www.e2factory.org
e2factory is a registered trademark by emlix GmbH.
This file is part of e2factory, the emlix embedded build system.
-
+
e2factory is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
]]
end
u.url = url
-- parse: transport://server/path
- u.transport, u.server, u.path =
+ u.transport, u.server, u.path =
u.url:match("(%S+)://([^/]*)(.*)")
if not u.transport then
return nil, string.format("can't parse url: %s", url)
-- parse the server part
if u.server:match("(%S+):(%S+)@(%S+)") then
-- user:pass@host
- u.user, u.pass, u.servername =
+ u.user, u.pass, u.servername =
u.server:match("(%S+):(%S+)@(%S+)")
elseif u.server:match("(%S+)@(%S+)") then
-- user@host
# Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
# Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
# Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-#
+#
# For more information have a look at http://www.e2factory.org
#
# e2factory is a registered trademark by emlix GmbH.
#
# This file is part of e2factory, the emlix embedded build system.
-#
+#
# e2factory is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-
+
For more information have a look at http://www.e2factory.org
e2factory is a registered trademark by emlix GmbH.
This file is part of e2factory, the emlix embedded build system.
-
+
e2factory is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
]]
Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-
+
For more information have a look at http://www.e2factory.org
e2factory is a registered trademark by emlix GmbH.
This file is part of e2factory, the emlix embedded build system.
-
+
e2factory is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
]]
Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-
+
For more information have a look at http://www.e2factory.org
e2factory is a registered trademark by emlix GmbH.
This file is part of e2factory, the emlix embedded build system.
-
+
e2factory is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
]]
# Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
# Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
# Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-#
+#
# For more information have a look at http://www.e2factory.org
#
# e2factory is a registered trademark by emlix GmbH.
#
# This file is part of e2factory, the emlix embedded build system.
-#
+#
# e2factory is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-
+
For more information have a look at http://www.e2factory.org
e2factory is a registered trademark by emlix GmbH.
This file is part of e2factory, the emlix embedded build system.
-
+
e2factory is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
]]
os.exit(99)
end
assert_chroot_environment(path)
- local cmd = string.format("%s -i %s '%s' %s", env_tool, chroot_tool, path,
+ local cmd = string.format("%s -i %s '%s' %s", env_tool, chroot_tool, path,
command)
local rc = os.execute(cmd)
os.exit(rc/256)
elseif tartype == "tar" then
tarflags = ""
end
- local cmd = string.format("%s -i %s %s -C '%s' -xf '%s'",
+ local cmd = string.format("%s -i %s %s -C '%s' -xf '%s'",
env_tool, tar_tool, tarflags, path, file)
local rc = os.execute(cmd)
os.exit(rc/256)
os.exit(99)
end
assert_chroot_environment(path)
- local cmd = string.format("%s -i %s root:root '%s'", env_tool, chown_tool,
+ local cmd = string.format("%s -i %s root:root '%s'", env_tool, chown_tool,
path)
local rc = os.execute(cmd)
os.exit(rc/256)
call.tmpdir = arg[2] .. "/e2build"
call.proj = arg[3]
call.result = arg[4]
-call.chroot_path = call.tmpdir .. "/" .. call.username .. "/" ..
+call.chroot_path = call.tmpdir .. "/" .. call.username .. "/" ..
call.proj .. "/" .. call.result .. "/chroot"
local rc = 1
if call.cmd == "setup-chroot" then
- rc = os.execute("mkdir -p " .. call.chroot_path ..
+ rc = os.execute("mkdir -p " .. call.chroot_path ..
" && touch \"" .. call.chroot_path .. "/emlix-chroot\"")
os.exit(rc/256)
elseif string.match(call.file, ".tar$") then
opts = "-xf"
end
- rc = os.execute("tar -C \"" .. call.chroot_path ..
+ rc = os.execute("tar -C \"" .. call.chroot_path ..
"\" " .. opts .. " \"" .. call.file .. "\"")
os.exit(rc/256)
elseif call.cmd == "prepare" then
- rc = os.execute("PATH=/usr/sbin:/sbin:$PATH " ..
+ rc = os.execute("PATH=/usr/sbin:/sbin:$PATH " ..
"T=\"/tmp/e2\" " ..
"r=\"" .. call.result .. "\" " ..
"chroot " .. call.chroot_path .. " " ..
os.exit(rc/256)
elseif call.cmd == "runbuild" then
- rc = os.execute("PATH=/usr/sbin:/sbin:$PATH " ..
+ rc = os.execute("PATH=/usr/sbin:/sbin:$PATH " ..
"T=\"/tmp/e2\" " ..
"r=\"" .. call.result .. "\" " ..
"chroot " .. call.chroot_path .. " " ..
else
command = ""
end
- rc = os.execute("PATH=/usr/sbin:/sbin:$PATH " ..
+ rc = os.execute("PATH=/usr/sbin:/sbin:$PATH " ..
"T=\"/tmp/e2\" " ..
"r=\"" .. call.result .. "\" " ..
"chroot " .. call.chroot_path .. " " ..
Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-
+
For more information have a look at http://www.e2factory.org
e2factory is a registered trademark by emlix GmbH.
This file is part of e2factory, the emlix embedded build system.
-
+
e2factory is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#define E2_ROOT_TOOL_NAME "e2-root"
#endif
#ifndef E2_ROOT_TOOL_PATH
-#define E2_ROOT_TOOL_PATH TOOLDIR "/" E2_ROOT_TOOL_NAME
+#define E2_ROOT_TOOL_PATH TOOLDIR "/" E2_ROOT_TOOL_NAME
#endif
char *tool_name = E2_ROOT_TOOL_NAME;
arg[k] = NULL;
if(getenv("DEBUG")) {
- printf("%s\n", E2_ROOT_TOOL_PATH);
+ printf("%s\n", E2_ROOT_TOOL_PATH);
for(i=0; arg[i]; i++) {
printf("\"%s\"\n", arg[i]);
}
Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-
+
For more information have a look at http://www.e2factory.org
e2factory is a registered trademark by emlix GmbH.
This file is part of e2factory, the emlix embedded build system.
-
+
e2factory is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
]]
end
e2call.globaltool = buildconfig.TOOLDIR .. "/" .. e2call.toolname
-if root then
+if root then
e2call.localtool = root .. "/.e2/bin/" .. e2call.toolname
end
lua = buildconfig.LUA
cmd = string.format("%s %s %s %s", env, lua, e2call.tool, e2call.arg_string)
elseif not root then
- e2lib.abort(e2call.toolname ..
+ e2lib.abort(e2call.toolname ..
" is not a global tool and we're not in a project environment")
elseif root and e2util.stat(e2call.localtool) then
e2call.tool = e2call.localtool
root .. "/.e2/lib/e2/?.lua' " ..
"LUA_CPATH=" .. root .. "/.e2/lib/e2/?.so"
cmd = env .. " " ..
- root .. "/.e2/bin/e2-lua " ..
+ root .. "/.e2/bin/e2-lua " ..
e2call.tool .. " " .. e2call.arg_string
else
e2lib.abort(e2call.toolname .. " is neither local nor global tool")
# Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
# Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
# Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-#
+#
# For more information have a look at http://www.e2factory.org
#
# e2factory is a registered trademark by emlix GmbH.
#
# This file is part of e2factory, the emlix embedded build system.
-#
+#
# e2factory is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
# Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
# Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-#
+#
# For more information have a look at http://www.e2factory.org
#
# e2factory is a registered trademark by emlix GmbH.
#
# This file is part of e2factory, the emlix embedded build system.
-#
+#
# e2factory is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
CLEAN_FILES = *~ *.so linux32 *.lc *.o
CFLAGS += -I. -I$(DESTDIR)$(INCDIR) -I$(DESTDIR)$(INCDIR)/lua-$(LUA_VERSION) \
-I../lua/lua-$(LUA_VERSION)/src -fPIC
-LDFLAGS += -L. -L../lua/lua-$(LUA_VERSION)/src -Wl,-R$(LIBDIR)
+LDFLAGS += -L. -L../lua/lua-$(LUA_VERSION)/src -Wl,-R$(LIBDIR)
LOCALLUATOOLS = \
build dlist dsort fetch-sources new-source ls-project \
playground build-numbers cf
Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-
+
For more information have a look at http://www.e2factory.org
e2factory is a registered trademark by emlix GmbH.
This file is part of e2factory, the emlix embedded build system.
-
+
e2factory is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
]]
Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-
+
For more information have a look at http://www.e2factory.org
e2factory is a registered trademark by emlix GmbH.
This file is part of e2factory, the emlix embedded build system.
-
+
e2factory is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
]]
if opts.release then
e2lib.abort("--release and --playground are mutually exclusive")
end
- if opts.all then
+ if opts.all then
e2lib.abort("--all and --playground are mutually exclusive")
end
if #opts.arguments ~= 1 then
end
-- a list of results to build, topologically sorted
-local sel_res = {}
+local sel_res = {}
if #results > 0 then
local re
sel_res, re = e2tool.dlist_recursive(info, results)
Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-
+
For more information have a look at http://www.e2factory.org
e2factory is a registered trademark by emlix GmbH.
This file is part of e2factory, the emlix embedded build system.
-
+
e2factory is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
]]
Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-
+
For more information have a look at http://www.e2factory.org
e2factory is a registered trademark by emlix GmbH.
This file is part of e2factory, the emlix embedded build system.
-
+
e2factory is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
]]
end
if not src.cvsroot then
e2lib.warnf("WDEFAULT", "in source %s:", sourcename)
- e2lib.warnf("WDEFAULT",
+ e2lib.warnf("WDEFAULT",
" source has no `cvsroot' attribute, defaulting to the server path")
src.cvsroot = "."
end
if src.sourceid[source_set] then
return true, nil, src.sourceid[source_set]
end
- local e = new_error("calculating sourceid failed for source %s",
+ local e = new_error("calculating sourceid failed for source %s",
sourcename)
local hc = hash.hash_start()
hash.hash_line(hc, src.name)
hash.hash_line(hc, src.type)
- hash.hash_line(hc, src._env:id())
+ hash.hash_line(hc, src._env:id())
for _,l in ipairs(src.licences) do
hash.hash_line(hc, l)
local licenceid, re = e2tool.licenceid(info, l)
-- we rely on tags being unique with cvs
hc:hash_line(src.tag)
else
- -- the old function took a hash of the CVS/Entries file, but
- -- forgot the subdirecties' CVS/Entries files. We might
+ -- the old function took a hash of the CVS/Entries file, but
+ -- forgot the subdirecties' CVS/Entries files. We might
-- reimplement that once...
e:append("cannot calculate sourceid for source set %s",
source_set)
Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-
+
For more information have a look at http://www.e2factory.org
e2factory is a registered trademark by emlix GmbH.
This file is part of e2factory, the emlix embedded build system.
-
+
e2factory is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
]]
Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-
+
For more information have a look at http://www.e2factory.org
e2factory is a registered trademark by emlix GmbH.
This file is part of e2factory, the emlix embedded build system.
-
+
e2factory is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
]]
Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-
+
For more information have a look at http://www.e2factory.org
e2factory is a registered trademark by emlix GmbH.
This file is part of e2factory, the emlix embedded build system.
-
+
e2factory is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
]]
local term = e2lib.globals.terminal
local e2_su = tools.get_tool("e2-su-2.2")
local cmd = string.format("%s %s chroot_2_3 '%s' %s",
- res.build_config.chroot_call_prefix, e2_su,
+ res.build_config.chroot_call_prefix, e2_su,
res.build_config.base, chroot_command)
e2tool.set_umask(info)
os.execute(cmd)
local function append_to_build_driver(info, r, script)
local res = info.results[r]
- res.build_config.build_driver =
+ res.build_config.build_driver =
res.build_config.build_driver .. string.format("%s\n", script)
end
-- calculate the path to the result
local server, location = res.build_mode.storage(info.project_location,
info.release_id)
- local location1 = string.format("%s/%s/%s", location, r,
+ local location1 = string.format("%s/%s/%s", location, r,
res.build_mode.buildid(res.buildid))
local cache_flags = {
check_only = true
-- skip results that depend on this result
-- example: toolchain, busybox, sources, iso,
-- sources being the result collecting the project:
--- the results sources and iso won't be included, as that would lead to
+-- the results sources and iso won't be included, as that would lead to
-- an impossibility to calculate buildids (infinite recursion)
-- @param c table: build context
-- @return bool
local rc, re
local e = new_error("providing project data to this build failed")
-- project/proj/init/<files>
- local destdir = string.format("%s/project/proj/init",
+ local destdir = string.format("%s/project/proj/init",
res.build_config.T)
e2lib.mkdir(destdir, "-p")
local init_files = e2util.directory(info.root .. "/proj/init")
for _,g in pairs(res.collect_project_chroot_groups) do
e2lib.log(3, string.format("chroot group: %s", g))
local grp = info.chroot.groups_byname[g]
- local destdir = string.format("%s/project/chroot/%s",
+ local destdir = string.format("%s/project/chroot/%s",
res.build_config.T, g)
e2lib.mkdir(destdir, "-p")
local makefile, msg = io.open(
if not rc then
return false, e:cat(re)
end
- local destdir = string.format("%s/project/%s",
+ local destdir = string.format("%s/project/%s",
res.build_config.T, e2tool.resultdir(n))
e2lib.mkdir(destdir, "-p")
-- copy files
for _,s in ipairs(info.results[r].collect_project_sources) do
local src = info.sources[s]
e2lib.log(3, string.format("source: %s", s))
- local destdir = string.format("%s/project/%s",
+ local destdir = string.format("%s/project/%s",
res.build_config.T, e2tool.sourcedir(s))
e2lib.mkdir(destdir, "-p")
local source_set = res.build_mode.source_set()
Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-
+
For more information have a look at http://www.e2factory.org
e2factory is a registered trademark by emlix GmbH.
This file is part of e2factory, the emlix embedded build system.
-
+
e2factory is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
]]
-- @field branch string: branch name
-- @field tag table: table of tag names (strings)
-- @field file table: table of file records (tables)
--- @field fhash string: hash value for this source, for use in buildid
+-- @field fhash string: hash value for this source, for use in buildid
-- calculation
-- @field flist table: array of files
-- (deprecated, replaced by file records)
-- @field depends table of strings: list of dependencies
-- @field chroot table of strings: list of chroot groups to use
-- @field collect_project bool: collect the project structure into this result?
--- @field collect_project_default_result string: which result shall be
+-- @field collect_project_default_result string: which result shall be
-- collected, including recursive dependencies?
-- @field collect_project_results table: sorted list of results to be
-- collected
end
local g = {} -- compose the environment for the config file
- g.env = info.env -- env
+ g.env = info.env -- env
g.string = string -- string
for _,type in ipairs(types) do
g[type] = f[type] -- and some config functions
info.root_server = "file://" .. info.root
info.root_server_name = "."
- -- the proj_storage server is equivalent to
+ -- the proj_storage server is equivalent to
-- info.default_repo_server:info.project-locaton
info.proj_storage_server_name = "proj-storage"
if not rc then
return false, e:cat(re)
end
-
+
-- licences
rc, re = load_user_config(info, info.root .. "/proj/licences",
info, "licences", "e2licence")
table.sort(info.licences_sorted)
rc, re = load_source_config(info)
- if not rc then
+ if not rc then
return false, e:cat(re)
end
end
-- read .e2/proj-location
- info.project_location_config = string.format("%s/.e2/project-location",
+ info.project_location_config = string.format("%s/.e2/project-location",
info.root)
local line, re = e2lib.read_line(info.project_location_config)
if not line then
local hc = hash.hash_start()
for f in e2lib.directory(info.root .. "/proj/init") do
if not e2lib.is_backup_file(f) then
- local location = string.format("proj/init/%s",
+ local location = string.format("proj/init/%s",
e2lib.basename(f))
local f = {
server = info.root_server_name,
-- e2tool.tag_available(info, check_local, check_remote)
--
-- Return true if the tags are available, false if not.
--- Choose local and remote checking by setting check_local and
+-- Choose local and remote checking by setting check_local and
-- check_remote.
--
--- TODO: works with the null project. Use and/or write scm specific
+-- TODO: works with the null project. Use and/or write scm specific
-- code to make it usable for projects that use non-git scms.
function tag_available(info, check_local, check_remote)
e2lib.shquote(s.tag))
rc = e2lib.callcmd_capture(cmd)
if rc ~= 0 then
- e2lib.log(1, "Fatal: source " .. s.name
+ e2lib.log(1, "Fatal: source " .. s.name
.. ": local tag not available: " .. s.tag)
rc = false
end
e2lib.shquote(s.tag))
rc = e2lib.callcmd_capture(cmd)
if rc ~= 0 then
- e2lib.log(1, "Fatal: " .. s.name .. ": remote tag not available: "
+ e2lib.log(1, "Fatal: " .. s.name .. ": remote tag not available: "
.. s.tag)
rc = false
end
-- e2tool.pre_tag_check(info, check_local, check_remote)
--
-- Return true if all checks succeed and false if not.
--- For offline usage local and remote checking can be turned on
+-- For offline usage local and remote checking can be turned on
-- as needed.
function pre_tag_check(info, tag, check_local, check_remote)
end
-- return false if any fatal errors occured
- if not e2_has_fixed_tag_flag or
- has_pseudotags_flag or
+ if not e2_has_fixed_tag_flag or
+ has_pseudotags_flag or
tag_unavailable_flag or
e2_tag_exists_flag then
return false
function hashcache_setup(info)
local e = new_error("reading hash cache")
local rc, re
- e2lib.logf(4, "loading hashcache from file: %s", info.hashcache_file)
+ e2lib.logf(4, "loading hashcache from file: %s", info.hashcache_file)
info.hashcache = {}
local c, msg = loadfile(info.hashcache_file)
if not c then
end
hc:hash_line(fileid)
end
- e2lib.log(4, string.format("hash data for chroot group %s\n%s",
+ e2lib.log(4, string.format("hash data for chroot group %s\n%s",
groupname, hc.data))
g.groupid = hc:hash_finish()
return g.groupid
end
function add_source_result(info, sourcename, source_set)
- e2lib.log(3, string.format("adding source result for source %s",
+ e2lib.log(3, string.format("adding source result for source %s",
sourcename))
local src = info.sources[sourcename]
local r = {}
end
if res.files then
e2lib.warnf("WDEPRECATED", "in result %s", resultname)
- e2lib.warnf("WDEPRECATED",
+ e2lib.warnf("WDEPRECATED",
" files attribute is deprecated and no longer used")
res.files = nil
end
for r, res in pairs(info.results) do
local bn = info.build_numbers[r]
if not bn then
- e2lib.warnf("WOTHER",
+ e2lib.warnf("WOTHER",
"creating new build number entry for result: %s", r)
-- create a new entry
bn = {}
end
---- select results based upon a list of results usually given on the
+--- select results based upon a list of results usually given on the
-- command line. Parameters are assigned to all selected results.
-- @param info the info structure
-- @param results table: list of result names
if not res then
return false, e:append("no such result: %s", r)
end
- local s = res.selected and "[ selected ]" or
+ local s = res.selected and "[ selected ]" or
"[dependency]"
local f = res.force_rebuild and "[force rebuild]" or ""
local b = res.request_buildno and "[request buildno]" or ""
end
--- set umask to value used for build processes
--- @param info
+-- @param info
function set_umask(info)
e2lib.logf(4, "setting umask to %04o", info.chroot_umask)
e2util.umask(info.chroot_umask)
end
return base
end
-
+
-- get directory for a result
-- Returns the path to the resultdir and the optional postfix is appended
-- with a slash (e.g. res/name/build-script)
Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-
+
For more information have a look at http://www.e2factory.org
e2factory is a registered trademark by emlix GmbH.
This file is part of e2factory, the emlix embedded build system.
-
+
e2factory is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
]]
if #opts.arguments > 0 then
opts.selection = true
end
-if not (opts.scm or opts.files or opts.chroot or opts.selection
+if not (opts.scm or opts.files or opts.chroot or opts.selection
or opts.git or opts.cvs or opts.svn) then
e2lib.warn("WOTHER", "Selecting scm sources by default")
opts.scm = true
end
end
end
-
+
-- update
for _, s in pairs(info.sources) do
local has_wc = scm.has_working_copy(info, s.name)
e2lib.log(1, "updating working copy for " .. s.name)
local rc, re = scm.update(info, s.name)
if not rc then
- e2lib.log(4, string.format("updating working copy failed: %s",
+ e2lib.log(4, string.format("updating working copy failed: %s",
s.name))
e:cat(re)
end
end
end
-if opts.scm or opts.files or opts.git or opts.cvs or opts.svn or
+if opts.scm or opts.files or opts.git or opts.cvs or opts.svn or
opts.selection then
e2lib.log(2, "fetching sources...")
local rc, re = fetch_sources(info, opts, sel)
Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-
+
For more information have a look at http://www.e2factory.org
e2factory is a registered trademark by emlix GmbH.
This file is part of e2factory, the emlix embedded build system.
-
+
e2factory is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
]]
local s = info.sources[sourcename]
-- cache all files for this source
for i,f in pairs(s.file) do
- e2lib.log(4, string.format("files.cache_source: caching file %s:%s",
+ e2lib.log(4, string.format("files.cache_source: caching file %s:%s",
f.server, f.location))
local flags = { cache = true }
if f.server ~= info.root_server_name then
return false, e
end
else
- e2lib.log(4, string.format("not caching %s:%s (stored locally)",
+ e2lib.log(4, string.format("not caching %s:%s (stored locally)",
f.server, f.location))
end
end
symlink = buildpath .. "/" .. sourcename
if file.unpack ~= sourcename then
if not e2util.symlink(file.unpack, symlink) then
- return false, e:append("cannot create symlink: %s -> %s", symlink,
+ return false, e:append("cannot create symlink: %s -> %s", symlink,
file.unpack)
end
end
return false, e:cat(re)
end
else
- e2lib.abort(string.format("missing destiny for file %s (%s)",
+ e2lib.abort(string.format("missing destiny for file %s (%s)",
file.location, file.server))
end
end
if src.sourceid then
display[i] = string.format("sourceid = %s", src.sourceid)
i = i + 1
- end
+ end
return display
end
local hc = hash.hash_start()
hash.hash_line(hc, src.name)
hash.hash_line(hc, src.type)
- hash.hash_line(hc, src._env:id())
+ hash.hash_line(hc, src._env:id())
for _,l in ipairs(src.licences) do
hash.hash_line(hc, l)
local licenceid, re = e2tool.licenceid(info, l)
hash.hash_line(hc, tostring(f.patch))
hash.hash_line(hc, tostring(f.copy))
end
- e2lib.log(4, string.format("hash data for source %s\n%s", src.name,
+ e2lib.log(4, string.format("hash data for source %s\n%s", src.name,
hc.data))
src.sourceid = hash.hash_finish(hc)
return true, nil, src.sourceid
Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-
+
For more information have a look at http://www.e2factory.org
e2factory is a registered trademark by emlix GmbH.
This file is part of e2factory, the emlix embedded build system.
-
+
e2factory is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
]]
if not line then
break
end
- local x
+ local x
-- search for a line matching '* <branchname>'
x, branch = line:match("^(\* )(%S*)$")
if x and branch then
src.licences_default_applied = true
if not src.licences and src.licence then
e2lib.warnf("WDEPRECATED", "in source %s:", src.name)
- e2lib.warnf("WDEPRECATED",
+ e2lib.warnf("WDEPRECATED",
" licence attribute is deprecated. Replace by licences.")
src.licences = src.licence
end
if not src.licences then
e2lib.warnf("WDEFAULT", "in source %s:", src.name)
- e2lib.warnf("WDEFAULT",
+ e2lib.warnf("WDEFAULT",
" licences attribute missing. Defaulting to empty list.")
src.licences = {}
elseif type(src.licences) == "string" then
e2lib.warnf("WDEPRECATED", "in source %s:", src.name)
- e2lib.warnf("WDEPRECATED",
+ e2lib.warnf("WDEPRECATED",
" licences attribute is not in table format. Converting.")
src.licences = { src.licences }
end
e2lib.log(2, string.format("cloning %s:%s [%s]",
src.server, src.location, src.branch))
local skip_checkout = e2lib.globals.git_skip_checkout
- rc, re = generic_git.git_clone_from_server(info.cache, src.server,
+ rc, re = generic_git.git_clone_from_server(info.cache, src.server,
src.location, wrk, skip_checkout)
if not rc then
return false, e:cat(re)
start_point)
if not rc then
return false, e:cat(re)
- end
+ end
local rc, re = generic_git.git_checkout1(wrk, src.branch)
if not rc then
return false, e:cat(re)
end
function git.git_remote_add(c, lserver, llocation, name, rserver, rlocation)
- e2lib.log(4, string.format("%s, %s, %s, %s, %s, %s",
- tostring(c), tostring(lserver), tostring(llocation),
+ e2lib.log(4, string.format("%s, %s, %s, %s, %s, %s",
+ tostring(c), tostring(lserver), tostring(llocation),
tostring(name), tostring(rserver), tostring(rlocation)))
local rurl, e = cache.remote_url(c, rserver, rlocation)
if not rurl then
if not rc then
return nil, e:cat(re)
end
- -- try to calculte the sourceid, but do not care if it fails.
+ -- try to calculte the sourceid, but do not care if it fails.
-- working copy might be unavailable
scm.sourceid(info, sourcename, "tag")
scm.sourceid(info, sourcename, "branch")
Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-
+
For more information have a look at http://www.e2factory.org
e2factory is a registered trademark by emlix GmbH.
This file is part of e2factory, the emlix embedded build system.
-
+
e2factory is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
//#include <linux/personality.h>
//#undef personality
#include <sys/personality.h>
-#include <stdio.h>
+#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/stat.h>
-
+
/* taken from x86_64 headers */
#define PER_LINUX32 0x0008
Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-
+
For more information have a look at http://www.e2factory.org
e2factory is a registered trademark by emlix GmbH.
This file is part of e2factory, the emlix embedded build system.
-
+
e2factory is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
]]
-- remove leading spaces, that allows easier string
-- append code below, where collecting multiple items
while v:sub(1,1) == " " do
-
+
v = v:sub(2)
end
print(string.format(" %s %s o--%-10s = %s", s1, s2, k, v))
# Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
# Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
# Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-#
+#
# For more information have a look at http://www.e2factory.org
#
# e2factory is a registered trademark by emlix GmbH.
#
# This file is part of e2factory, the emlix embedded build system.
-#
+#
# e2factory is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-SUBDIRS =
+SUBDIRS =
TOPLEVEL = ../..
include $(TOPLEVEL)/make.vars
# Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
# Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
# Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-#
+#
# For more information have a look at http://www.e2factory.org
#
# e2factory is a registered trademark by emlix GmbH.
#
# This file is part of e2factory, the emlix embedded build system.
-#
+#
# e2factory is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
# Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
# Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-#
+#
# For more information have a look at http://www.e2factory.org
#
# e2factory is a registered trademark by emlix GmbH.
#
# This file is part of e2factory, the emlix embedded build system.
-#
+#
# e2factory is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
# Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
# Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-#
+#
# For more information have a look at http://www.e2factory.org
#
# e2factory is a registered trademark by emlix GmbH.
#
# This file is part of e2factory, the emlix embedded build system.
-#
+#
# e2factory is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
# Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
# Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-#
+#
# For more information have a look at http://www.e2factory.org
#
# e2factory is a registered trademark by emlix GmbH.
#
# This file is part of e2factory, the emlix embedded build system.
-#
+#
# e2factory is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
# Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
# Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-#
+#
# For more information have a look at http://www.e2factory.org
#
# e2factory is a registered trademark by emlix GmbH.
#
# This file is part of e2factory, the emlix embedded build system.
-#
+#
# e2factory is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
# Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
# Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-#
+#
# For more information have a look at http://www.e2factory.org
#
# e2factory is a registered trademark by emlix GmbH.
#
# This file is part of e2factory, the emlix embedded build system.
-#
+#
# e2factory is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-
+
For more information have a look at http://www.e2factory.org
e2factory is a registered trademark by emlix GmbH.
This file is part of e2factory, the emlix embedded build system.
-
+
e2factory is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
]]
Put new source onto an existing server.
--git
- Put a repository named <name> into the projects' 'git/' directory on
+ Put a repository named <name> into the projects' 'git/' directory on
the server, i.e. <server>/<project>/git/<name>.git
- The server defaults to the default repository server, and the <project>
+ The server defaults to the default repository server, and the <project>
part is the project location relative to the projects server.
--files
-- @return a table with fields checksum and checksum_type ("sha1", "md5")
-- @return nil, or an error string on error
function read_checksum(checksum_file, filename)
- e2lib.log(4, string.format("read_checksum(%s, %s)", checksum_file,
+ e2lib.log(4, string.format("read_checksum(%s, %s)", checksum_file,
filename))
local f, e = io.open(checksum_file, "r")
if not f then
-- @param flags table: flags
-- @return bool
-- @return nil, an error string on error
-function new_files_source(c, server, location, source_file, checksum_file,
+function new_files_source(c, server, location, source_file, checksum_file,
checksum_file_format, no_checksum)
local source_file_base = e2lib.basename(source_file)
local do_checksum = (not no_checksum)
if not e2lib.chdir(tmpdir) then
e2lib.abort("can't chdir")
end
-
+
-- download
e2lib.log(1, string.format("fetching %s ...", source_file))
local rc, re = download(source_file)
e2lib.abort(re)
end
checksum_file_base = e2lib.basename(checksum_file)
- checksum_file1 = string.format("%s.orig",
+ checksum_file1 = string.format("%s.orig",
checksum_file_base)
rc = mv(checksum_file_base, checksum_file1)
if not rc then
if do_checksum then
if cs1.checksum == cs2.checksum then
e2lib.log(2, string.format(
- "checksum matches (%s): %s",
+ "checksum matches (%s): %s",
cs1.checksum_type, cs1.checksum))
else
e2lib.abort("checksum mismatch")
-- store
local flags = {}
local rlocation = string.format("%s/%s", location, source_file_base)
- e2lib.log(1, string.format("storing file %s to %s:%s",
+ e2lib.log(1, string.format("storing file %s to %s:%s",
source_file_base, server, rlocation))
local rc, e = cache.push_file(c, source_file_base, server,
rlocation, flags)
e2lib.abort(e)
end
local rlocation = string.format("%s/%s", location, checksum_file2)
- e2lib.log(1, string.format("storing file %s to %s:%s",
+ e2lib.log(1, string.format("storing file %s to %s:%s",
checksum_file2, server, rlocation))
local rc, e = cache.push_file(c, checksum_file2, server,
rlocation, flags)
if not no_checksum and not checksum_file then
e2lib.abort("checksum file not given")
end
- local rc = new_files_source(info.cache, server, location, source_file,
+ local rc = new_files_source(info.cache, server, location, source_file,
checksum_file, checksum_file_format, no_checksum)
else
- e2lib.log(1,
+ e2lib.log(1,
"Creating repositories other than git is not supported yet.\n"..
"You might nevertheless use 'e2-use-source' to use existing\n"..
"sources in your project")
Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-
+
For more information have a look at http://www.e2factory.org
e2factory is a registered trademark by emlix GmbH.
This file is part of e2factory, the emlix embedded build system.
-
+
e2factory is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
]]
Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-
+
For more information have a look at http://www.e2factory.org
e2factory is a registered trademark by emlix GmbH.
This file is part of e2factory, the emlix embedded build system.
-
+
e2factory is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
]]
--- set a policy mode to a value
-- @class function
-- @name policy.set
--- @param id string: the policy identifier: storage, source_set, dep_set,
+-- @param id string: the policy identifier: storage, source_set, dep_set,
-- buildid
-- @param val the function to use : storage_*, source_set_*, etc.
-- @return nil
--- get a policy function
-- @class function
-- @name policy.get
--- @param id string: the policy identifier: storage, source_set, dep_set,
+-- @param id string: the policy identifier: storage, source_set, dep_set,
-- buildid
-- @return function: the policy function
function get(mode, id)
Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-
+
For more information have a look at http://www.e2factory.org
e2factory is a registered trademark by emlix GmbH.
This file is part of e2factory, the emlix embedded build system.
-
+
e2factory is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
]]
local hc = hash.hash_start()
hash.hash_line(hc, src.name)
hash.hash_line(hc, src.type)
- hash.hash_line(hc, src._env:id())
+ hash.hash_line(hc, src._env:id())
for _,l in pairs(src.licences) do
hash.hash_line(hc, l)
end
# Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
# Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
# Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-#
+#
# For more information have a look at http://www.e2factory.org
#
# e2factory is a registered trademark by emlix GmbH.
#
# This file is part of e2factory, the emlix embedded build system.
-#
+#
# e2factory is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
install -m644 $(LUA_UNPACK_PATH)/lua-5.1.3/src/lualib.h $(DESTDIR)$(INCDIR)/lua-5.1.3; \
install -m644 $(LUA_UNPACK_PATH)/lua-5.1.3/src/luaconf.h $(DESTDIR)$(INCDIR)/lua-5.1.3; \
-uninstall:
+uninstall:
rm -f $(DESTDIR)$(LIBEXECDIR)/e2-lua-5.1.3; \
rm -f $(DESTDIR)$(LIBEXECDIR)/e2-luac-5.1.3; \
rm -fr $(DESTDIR)$(LIBEXECDIR)/lua-5.1.3; \
MANDIR = $(SHAREDIR)/man
DOCDIR = $(SHAREDIR)/doc/e2
TOOLDIR = $(LIBEXECDIR)/tools
-export PREFIX BINDIR LIBDIR INCDIR MANDIR TOOLDIR LIBEXECDIR LOCALSTATEDIR
+export PREFIX BINDIR LIBDIR INCDIR MANDIR TOOLDIR LIBEXECDIR LOCALSTATEDIR
export SYSCONFDIR
LOCALPREFIX = $(PROJECTDIR)/.e2
# Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
# Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
# Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-#
+#
# For more information have a look at http://www.e2factory.org
#
# e2factory is a registered trademark by emlix GmbH.
#
# This file is part of e2factory, the emlix embedded build system.
-#
+#
# e2factory is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
# Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
# Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-#
+#
# For more information have a look at http://www.e2factory.org
#
# e2factory is a registered trademark by emlix GmbH.
#
# This file is part of e2factory, the emlix embedded build system.
-#
+#
# e2factory is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
local t = {}
for ln in string.gmatch(str, "[^\n]*\n") do
if not string.match(ln, "^%s*$") then
- local res, bid, status, num =
+ local res, bid, status, num =
string.match(ln, "([-%w_]+)%s+(%x+)%s+(%S+)%s+(%d+)")
if res then
t[ res ] = { id = bid, num = num, status = status }
--
-- body: log-file section
--
--- query string:
+-- query string:
--
-- host=<hostname>
-- user=<username>
# Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
# Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
# Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-#
+#
# For more information have a look at http://www.e2factory.org
#
# e2factory is a registered trademark by emlix GmbH.
#
# This file is part of e2factory, the emlix embedded build system.
-#
+#
# e2factory is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
doc:
install-doc:
-
+
# e2factory build script template
#
# The build system provides the following variables for use in build scripts:
-# - E2_TMPDIR pointing to a temporary directory with a directory
+# - E2_TMPDIR pointing to a temporary directory with a directory
# structure
# - E2_RESULT the name of the result currently building
# - E2_BUILD_NUMBER the build number, 0 by default
# installing software for packaging
# ./env files containing environment variables are located here
# ./init init scripts are located here
-# ./script this directory holds the build driver and the build
+# ./script this directory holds the build driver and the build
# script
# ./in This directory is available but unused
# ./dep/<dependency> These directories hold result files from dependency
e2source {
-- the source name
- -- (is derived from the config file path if only one source is
+ -- (is derived from the config file path if only one source is
-- specified per file)
name = "name",
-- the source type
e2source {
-- the source name
- -- (is derived from the config file path if only one source is
+ -- (is derived from the config file path if only one source is
-- specified per file)
name = "name",
-- the source type
e2source {
-- the source name
- -- (is derived from the config file path if only one source is
+ -- (is derived from the config file path if only one source is
-- specified per file)
name = "name",
-- the source type
# Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
# Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, emlix GmbH
# Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH
-#
+#
# For more information have a look at http://www.e2factory.org
#
# e2factory is a registered trademark by emlix GmbH.
#
# This file is part of e2factory, the emlix embedded build system.
-#
+#
# e2factory is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#