Commit Graph

48095 Commits

Author SHA1 Message Date
Adrien Destugues
c9d31eeed6 More cookie fixes
* Add some error handling in NetworkCookie and don't add broken cookies
(or should I say crumbs?) to the cookie jar
 * More control on the path and domain, as well as the expiration time

We now pass Opera cookie testsuite functionality tests, as well as some
of the negative tests (we even do better than curl). Not going further
right now as this works well enough for positive cases and most
security/privacy issues are fixed (cross domain and cross path cookie
setting or spying).
2013-10-14 15:21:51 +02:00
Axel Dörfler
ae527df336 cdda: Use MemoryDeleter where it makes sense. 2013-10-14 00:47:42 +02:00
Axel Dörfler
a2d3d3ae54 cdda: got rid of kernel_cpp.h - it should not be used.
* It's "new" operator does not fail or throw on allocation problems, but
  just lets the constructor do its work (and likely crash because of
  accessing a null pointer).
2013-10-14 00:47:39 +02:00
Axel Dörfler
9499ef8e51 cdda: Fixed include order. 2013-10-14 00:47:34 +02:00
Rene Gollent
bab0501f32 Fix #10090.
- The checkfs help text is worded such that it would appear to require
both a device name and volume name when it actually requires either one
or the other.
2013-10-13 09:11:31 -04:00
Ingo Weinhold
dda53eae4b configure: haiku.hpkg now has a canonical name
Should fix the script on newer Haiku versions (and break it on older
ones). Ticket #10087.
2013-10-12 20:53:52 +02:00
François Revol
8fa75a8cca ARM: Add a fallback atomic_add() for bootloader
When ATOMIC_FUNCS_ARE_SYSCALLS atomic.S doesn't export it,
but it's used by packagefs.
2013-10-12 19:43:33 +02:00
François Revol
39d26e3cdb Set HAIKU_TARGET_IS_EXECUTABLE in KernelLd as well
The kernel also needs to be stripped for m68k.

Propagate it to the revisioned binary as well.
2013-10-12 18:42:57 +02:00
Ingo Weinhold
e29f08c37c Strip executables on m68k boot floppy image 2013-10-12 17:24:26 +02:00
Ingo Weinhold
3010e4f4ea AddFilesToContainer: Strip executables, if requested
Variable HAIKU_CONTAINER_STRIP_EXECUTABLES can be set on the container
to trigger that.
2013-10-12 17:23:56 +02:00
Ingo Weinhold
af2e206845 rule Link: Set HAIKU_TARGET_IS_EXECUTABLE on target 2013-10-12 17:22:16 +02:00
Ingo Weinhold
3162883efd Add rules StripFile[s] 2013-10-12 17:21:49 +02:00
Ingo Weinhold
19f94028f6 Revert "Allow stripping binaries when copying to image containers"
This reverts commit d6de84de66.
2013-10-12 16:01:02 +02:00
Ingo Weinhold
7879928fb2 Revert "Enable stripping binaries in m68k boot floppy"
This reverts commit e986f5fce9.
2013-10-12 16:00:21 +02:00
Ingo Weinhold
cc5c6133d2 Revert "Rework stripping binaries when copying to containers"
This reverts commit e2332987bc.
2013-10-12 16:00:02 +02:00
Ingo Weinhold
d05822f18b Revert "Preserve resources and attributes when copying stripped binaries"
This reverts commit a427aa2f4a.
2013-10-12 15:59:19 +02:00
Jérôme Duval
47fe7767ca pcnet: add pcn driver
* le still working ok with QEmu
* pcn brings support for the following devices in 32-bit mode (instead of 16-bit Lance
compatibility mode), all untested, feedback is welcome.
AMD Am79C971 PCnet-FAST, AMD Am79C972 PCnet-FAST+, AMD Am79C973/Am79C975 PCnet-FAST III,
AMD Am79C976 PCnet-PRO, AMD Am79C978 PCnet-Home, Allied-Telesis LA-PCI
* added PHY nsphy, nsphyter and ukphy, which seem the ones needed for pcn.
* synched miidevs with FreeBSD 9.2
2013-10-12 14:42:24 +02:00
Niels Sascha Reedijk
5de589dae2 Update translations from Pootle 2013-10-12 06:18:09 +02:00
François Revol
a427aa2f4a Preserve resources and attributes when copying stripped binaries
When asked to strip binaries when copying to containers we now
strip to a temporary file, copy over resources to it, copy it
to the container, then copy the attributes from the original
source.

This should allow stripping binaries while preserving attributes
and resources even when copying to images.
2013-10-12 02:37:20 +02:00
François Revol
e2332987bc Rework stripping binaries when copying to containers
We now only attempt to strip binaries, by detecting the
LINKFLAGS variable on the targets.

CopySetHaikuRevision now also forwards LINKFLAGS
to revisioned binaries.

Introduce separate AppendToContainerCopyFilesScriptStripFile actions
which are used for copying and stripping, and avoids many useless
shell tests.

When asked to strip binaries, they are detected and handled
individually for simplicity.

Note we still don't keep resources and attributes when stripping.
2013-10-12 01:41:46 +02:00
François Revol
e986f5fce9 Enable stripping binaries in m68k boot floppy
This makes it fit again.

We can't reference in BuildSetup a variable set with the other
ones in KernelArchitectureSetup since the rule is invoked later.
2013-10-11 23:30:57 +02:00
Adrien Destugues
b7d85d666a fix build. 2013-10-11 22:13:04 +02:00
Adrien Destugues
86a58ccd34 Remove deprecated package manager mockup app.
* HaikuDepot was started from scratch and deprecates this.
2013-10-11 21:44:09 +02:00
Adrien Destugues
f9d987ae68 HttpRequest: put cookies in a single header entry
* Http spec says headers can be split when they are comma separated
 * However, cookies are semicolon separated, so it is not acceptable to
split them.
 * We will want to implement some way to limit the cookie header entry
size, as servers have a limit on what they can accept (usually around 4K
characters). The RFC also says we don't need to remember more than 20
cookies per domain.
2013-10-11 21:44:08 +02:00
Oliver Tappe
8b08992799 Implement shebang-fixup for /usr/bin/env to runtime_loader.
* silently replace invocations /usr/bin/env with /bin/env
2013-10-11 13:00:33 +02:00
Adrien Destugues
eab89314ce NetworkCookie: fix date validity check
* January 1st 1970 is a perfectly valid expiration date for a cookie,
and shouldn't magically turn it into a session cookie.
2013-10-11 08:32:28 +02:00
Adrien Destugues
185471c844 HttpRequest: follow 302 redirects by default. 2013-10-11 08:32:27 +02:00
Adrien Destugues
d05f9e2d3d BDateTime: Time_T functions return or take a time_t
* They used an unsigned int, which led to overflows when trying to set
them to a time before January 1st, 1970 (local time)
 * Some things use January 1st, 1970, GMT (or UTC) as a reference point.
In my timezone this leads to such a negative date. An example is cookie
expiration dates which are set to this date to expire them immediately.
Spotted by Opera testsuite.
 * This makes the method unuseable for dates after 2036 (signed 32-bit
time_t will overflow then. This gives us just 33 years to switch to a
64-bit time_t. In te meantime, please try using other methods to set the
date and time for BDateTime objects if you need to go this far.
2013-10-11 08:32:26 +02:00
Adrien Destugues
a5ac24f00c BUrl: add a Redirect method
* This takes a relative path as a parameter, and modifies the object to
point to the given location.
 * '..' is not handled yet, and will be sent as-is to the server.
 * Makes it possible to follow more types of 302 redirects

In particular, I can now run the tests from Opera's testsuite
(testsuite.opera.com), which shows I have more work to do on cookie
handling.
2013-10-11 08:32:25 +02:00
Oliver Tappe
56434332b1 Make some values of default build profiles overridable.
* Defining things like HAIKU_ROOT_USER_NAME in UserBuildConfig now 
  has an effect on the image again.
2013-10-10 23:45:55 +02:00
Ingo Weinhold
40b9ac787c Bootstrap image haikuports.config: Comment out PACKAGER
The developer building the packages should enter their own address
instead. I just noticed that a lot of the HaikuPorts package have a
packager attribute with the dummy address "The Haiku build system
<build-system@haiku-os.org>" due to the previous default value.
2013-10-10 23:19:48 +02:00
Ingo Weinhold
0ea8902c52 package daemon: Fix typo in error message 2013-10-10 21:49:10 +02:00
Ingo Weinhold
e3555ffae4 package daemon: ExtractPackageContent(): Extract only requested
... content path.
2013-10-10 21:48:52 +02:00
Ingo Weinhold
302a8fc86e package: Escape \ in usage text 2013-10-10 21:40:20 +02:00
Ingo Weinhold
97d30f2cfb Encode the hrev revision into the package versions 2013-10-10 21:38:07 +02:00
Ingo Weinhold
04d9b3e89c CopySetHaikuRevision: Pull out rule DetermineHaikuRevision 2013-10-10 21:37:27 +02:00
Jérôme Duval
4e238d5e68 iprowifi4965: Re-add working wlan card pciid
*removed in the last sync
2013-10-10 17:49:02 +02:00
Adrien Destugues
1b14a4e30b HaikuPorts repo: also add source packages. 2013-10-10 16:47:34 +02:00
Adrien Destugues
161bd06777 Add HaikuPorts packages to help with WebKit development
* Required: libxslt, fixed libxml2 and sqlite3
 * Extras: Caya, vim, and updated cmake
2013-10-10 14:46:03 +02:00
Rene Gollent
db74c31d28 Fix #10081.
- The format specifiers for the literal % symbols in the help text
weren't correct, leading to vfprintf attempting to parse them, and
winding up hitting garbage pointers as a consequence, leading to a crash.
2013-10-09 22:04:53 -04:00
Ingo Weinhold
111e76b755 Properly canonically name the boot loader package 2013-10-10 00:40:10 +02:00
Ingo Weinhold
28fcae227c Stage 1 boot loader: Load the first file matching haiku_loader*
This allows naming the boot loader package canoncically. Due to code
size limitations we cannot perform a more correct name check, but there
shouldn't be any other entries in the packages directory with a name
with "haiku_loader" prefix, anyway.
2013-10-10 00:40:10 +02:00
François Revol
d6de84de66 Allow stripping binaries when copying to image containers
Currently only needed for boot floppy on some platforms.

Disabled for now.

Note we do not have a mean of knowing which file is a binary
or not so we just try to strip, and silently continue when
strip fails (like on the kernel settings file).

Also note strip actually replaces the file, which means it looses
both the resources and attributes, which shouldn't be a problem
for the boot floppy drivers archive, but is not wanted for other
images, so it's not usable elsewhere as such. Patch wanted.
2013-10-09 22:04:36 +02:00
François Revol
c19c9e08ef libroot: Pass members to filter as on-target variable 2013-10-09 22:04:36 +02:00
François Revol
158604494b libroot: Style fix 2013-10-09 22:04:35 +02:00
Adrien Destugues
0e030f22e1 Allow cookies domain to not start with a dot
* The dot was mandatory in older RFCs, but the new RFC6265 disallow it.
 * Both schemes are used around the web, so we allow them both.

It's possible to login to mail.google.com again.
2013-10-09 15:50:33 +02:00
Adrien Destugues
8ca6eeb77c HttpRequest: missing fields initializations
* Some fields weren't initialized, leading to random crashes later on
 * Remove the enum that was used for protocol options
 * Use a single field to track the request state, instead of separate
booleans.
2013-10-09 15:46:10 +02:00
Adrien Destugues
a5826aafb0 Don't send a chunked transfer terminator for non-chunked transfers.
* Fixes oversight from previous change.
 * Thanks hamishm for watching !
2013-10-09 12:12:43 +02:00
Adrien Destugues
780967d8ac Cleanup and fix cookies handling
* The cookie jar iterator now use a BObjectList instead of a BList
 * Add a convenience method to the cookie jar to add a cookie by BUrl
and raw cookie string.
 * Remove some methods in BNetworkCookie that could lead to invalid
cookies (cross-domain or with no domain at all).
 * Make the cookie parsing able to report errors
 * Fix off-by-one error in domain cookies validation.
2013-10-09 12:08:46 +02:00
Rene Gollent
a24b8b8055 HaikuDepot: Wrap dependency resolution in try/catch block.
- Ensure that any exceptions thrown by the package kit are caught
  and handled.
2013-10-08 22:10:41 -04:00